Highlight function - RadaeePDF.com
Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
13 Jul 2017
Microsoft has ended support for Windows Phone 8.1
Read More...
Questions about iOS development and PDF

TOPIC: Highlight function

Highlight function 1 year 5 months ago #12724

  • manwon
  • manwon's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 36
  • Thank you received: 1
I want to implement the highlight function. I saw the Highlight function in RDPDFViewController.m. But not work.
[m_view vSelMarkup:annotUnderlineColor :0];
    [popupMenu1 dismiss];
    if(m_bSel)
    {
        m_bSel = false;
        [m_view vSelEnd];
    }
I don't know how can I implement it.

Please Log in or Create an account to join the conversation.

Highlight function 1 year 5 months ago #12725

  • emanuele
  • emanuele's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 527
  • Karma: 20
  • Thank you received: 60
Hi,
what is the issue exactly?
Using demo project you can select text then tap on "HL" option to highlight.

If you need to customize this feature, you can take a look at OnLongPressed method in RDPDFViewController class (enable the text selection mode), to better understand how text selection and highlight works.

Please Log in or Create an account to join the conversation.

Highlight function 1 year 5 months ago #12726

  • manwon
  • manwon's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 36
  • Thank you received: 1
Sorry, I said clearly again.

I want to add the toolbar item on the toolbar including the highlight button. I want to press the highlight button to do the highlight function

Please Log in or Create an account to join the conversation.

Last edit: by manwon.

Highlight function 1 year 5 months ago #12729

  • emanuele
  • emanuele's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 527
  • Karma: 20
  • Thank you received: 60
Here is a quick explanation of markup annotations:

vSelMarkup method has 2 parameters: color and type.
- Color parameter allows you to set annotation color, in this case you can set it dynamically to have different colours.
- Type parameter is used to set the annotation type:
0: Highlight
1: Underline
2: StrikeOut
3: Highlight without round corner
4: Squiggly underline.

In demo project you can choose which type of annotation apply to selected text using the choice menu.
You can modify this behaviour to satisfy your needs, for example you can call the highlight in OnSelEnd method of RDPDFViewController to skip the choice menu.

Please Log in or Create an account to join the conversation.

Highlight function 1 year 5 months ago #12730

  • manwon
  • manwon's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 36
  • Thank you received: 1
Hello

I want to highlight more text in a time. But this function may be highlight a text in a time. How can I modify it?

Please Log in or Create an account to join the conversation.

Highlight function 1 year 5 months ago #12731

  • emanuele
  • emanuele's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 527
  • Karma: 20
  • Thank you received: 60
When you call highlight method, the selection mode will end:
if(m_bSel)
{
m_bSel = false;
[m_view vSelEnd];
}
You can change this behaviour and exit from this mode only when you need it

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum