How to highlight text in pdf file programmatically

I am using below mentioned code to highlight text programmaticaly using VB.net But required text is getting selected but doen't get permanently highlighted. Can anybody help me out.
Dim gAvDoc As
Acrobat.CAcroAVDoc 
Dim myhitlist As
Acrobat.CAcroHiliteList 
Dim mypdpage As
Acrobat.CAcroPDPage 
Dim acroPageView As
Acrobat.CAcroAVPageView 
Dim textSelect As
Acrobat.CAcroPDTextSelect 
Dim gPDFPath As
String
Dim gApp AsAcrobat.AcroApp 
gPDFPath =
"C:\Test.pdf"
gApp = CreateObject("AcroExch.App") 
gApp.Show()
gAvDoc = CreateObject("AcroExch.AVDoc") 
gAvDoc.Open(gPDFPath,
"")acroPageView = gAvDoc.GetAVPageView()
acroPageView.GoTo(1)
myhitlist = CreateObject(
"AcroExch.HiliteList")myhitlist.Add(50, 10)
mypdpage = acroPageView.GetPage()
textSelect = mypdpage.CreateWordHilite(myhitlist)
gAvDoc.SetTextSelection(textSelect) 
gAvDoc.ShowTextSelect()
gAvDoc.Close(True) 

Patrick on writting saving code also its not hightlighting the text. Text gets selected but it doen't get highlighted with yellow color...
Dim gAvDoc As
Acrobat.CAcroAVDoc 
Dim myhitlist As
Acrobat.CAcroHiliteList 
Dim mypdpage As
Acrobat.CAcroPDPage 
Dim acroPageView As
Acrobat.CAcroAVPageView 
Dim textSelect As
Acrobat.CAcroPDTextSelect 
Dim gPDFPath As String 
Dim gApp As Acrobat.AcroApp 
Dim mypddoc As Object
gPDFPath ="C:\Test.pdf"
'Initialize Acrobat by creating App object
gApp = CreateObject("AcroExch.App")mypddoc = CreateObject(
"AcroExch.PDDoc") 
gApp.Show()
mypddoc.Open(gPDFPath)
gAvDoc = CreateObject("AcroExch.AVDoc") 
gAvDoc = mypddoc.OpenAVDoc("testing")acroPageView = gAvDoc.GetAVPageView()
acroPageView.GoTo(1)
myhitlist = CreateObject(
"AcroExch.HiliteList")myhitlist.Add(50, 10)
mypdpage = acroPageView.GetPage() 
textSelect = mypdpage.CreateWordHilite(myhitlist)
gAvDoc.SetTextSelection(textSelect)
gAvDoc.ShowTextSelect()
mypddoc.Save(PDSaveFull, gPDFPath)
gAvDoc.Close(True)

Similar Messages

  • How to Extract the Highlight Text in PDF File

    Hi Scripters,
    i want know, how to extract the hightlight text in pdf files for text only format for (*.txt) file extension save.
    regards
    baby

    Hi,
    Okay i'll try do best.
    thanks for your reply.
    Regards
    Baby

  • How to control text for PDF Files in the BI7.0 Broadcaster

    Hi ,
    I am running a web template in the BI7.0 Broadcaster. The output prints in the PDF format. In the precalculation tab I have set up 4 variables(VAR1,VAR2 .. etc) . The main folder where these PDF files get stored I can control the text but dont know how to change the PDF file names which fall into this folder. All the PDF files have the technical name and number(like XXX_00000,XXX_00001 etc.) How can I control the text for these files.
    Thanks,
    Kal

    HI Kal,
    it is not possible to get any influence on the filenames. If you use Filternavigation the filename is generated to be unique.
    best regards,
    kai

  • Highlight text in pdf file

    Has anyone worked on "Regenerate the PDF appearance stream and draw a box behind the text highlighted.
    3rd point of this link - http://incubator.apache.org/pdfbox/userguide/highlighting.html.
    I have one pdf file and I know the X, Y cordinated and height and width of text to highlight.
    I am using pdfbox utility.and i want to highlight the existing text with yellow color.
    Any help would be highly appreciated.
    Thanks
    Gunjan

    Patrick on writting saving code also its not hightlighting the text. Text gets selected but it doen't get highlighted with yellow color...
    Dim gAvDoc As
    Acrobat.CAcroAVDoc 
    Dim myhitlist As
    Acrobat.CAcroHiliteList 
    Dim mypdpage As
    Acrobat.CAcroPDPage 
    Dim acroPageView As
    Acrobat.CAcroAVPageView 
    Dim textSelect As
    Acrobat.CAcroPDTextSelect 
    Dim gPDFPath As String 
    Dim gApp As Acrobat.AcroApp 
    Dim mypddoc As Object
    gPDFPath ="C:\Test.pdf"
    'Initialize Acrobat by creating App object
    gApp = CreateObject("AcroExch.App")mypddoc = CreateObject(
    "AcroExch.PDDoc") 
    gApp.Show()
    mypddoc.Open(gPDFPath)
    gAvDoc = CreateObject("AcroExch.AVDoc") 
    gAvDoc = mypddoc.OpenAVDoc("testing")acroPageView = gAvDoc.GetAVPageView()
    acroPageView.GoTo(1)
    myhitlist = CreateObject(
    "AcroExch.HiliteList")myhitlist.Add(50, 10)
    mypdpage = acroPageView.GetPage() 
    textSelect = mypdpage.CreateWordHilite(myhitlist)
    gAvDoc.SetTextSelection(textSelect)
    gAvDoc.ShowTextSelect()
    mypddoc.Save(PDSaveFull, gPDFPath)
    gAvDoc.Close(True)

  • How to search text in pdf file?

    Hi all
    I have to store the cover of a newspaper that include images and text and then should be able to search keywords in the cover.
    I've read about to store in pdf format and use intermedia text.
    I am just wondering the way to store and to do the search .
    Thanks all

    Hi,
    You need store the PDF document in a BLOB column and create a CTXSYS index type.
    e.g.: (.doc files)
    CREATE INDEX I_DOC ON DOC_TABLE (DOC_COLUMN) INDEXTYPE IS CTXSYS.CONTEXT PARAMETERS ('SYNC (ON COMMIT)');Then you can test typing this SQL below:
    select score(1) from DOC_TABLE where contains(DOC_COLUMN, 'My text', 1) > 0;In my case, i use this index for purpose to search on Word Documents (.doc)
    Maybe this link help you to create an index type using FILTERS, in order to search on PDF files:
    http://www.oracle.com/technology/products/text/htdocs/altfilters.htm
    Cheers

  • Copy Highlighted Text in Pdf file

    Hi everyone,
    Recently I downloaded the Adobe Reader X (version 10.0). This version allows me to highlight text (in yellow colour). However, If I want to copy a highlighted block of text (for instance to paste into a Word document), I am not able to do this. When I select the highlighted text and click on the right mouse click, it doesn't give me the opportunity to copy this text. Therefore, I was wondering whether I can copy the highlighted text in another way?
    Thanks in advance for a reply.
    Kind regards,
    Sleighon

    kaemus78 wrote:
    It seems you don't understand where the problem is.
    Indeed, I do not understand what the problem is.  When I tested it yesterday (using Reader 11.0.1) I actually took some screenshot, but I didn't think it necessary to post them.  I'll do it now.
    Opening a random PDF from My Documents
    then highlight some text
    apply the Select Tool (using right-click)
    select the same highlighted text
    copy (Ctrl+C) then paste it into an empty Word document
    Ok, the highlighting did not get copied over - is this the problem?

  • Not be able to highlight text in pdf file???

    Hello there,
    There is an issue with Mac I guess I mean I am not able to use highlight tool in phf but pretty sure the file is ok coz I can highlight the same file on the other laptop. Have this happened to you before and how to deal with it?
    Thanks!

    Patrick on writting saving code also its not hightlighting the text. Text gets selected but it doen't get highlighted with yellow color...
    Dim gAvDoc As
    Acrobat.CAcroAVDoc 
    Dim myhitlist As
    Acrobat.CAcroHiliteList 
    Dim mypdpage As
    Acrobat.CAcroPDPage 
    Dim acroPageView As
    Acrobat.CAcroAVPageView 
    Dim textSelect As
    Acrobat.CAcroPDTextSelect 
    Dim gPDFPath As String 
    Dim gApp As Acrobat.AcroApp 
    Dim mypddoc As Object
    gPDFPath ="C:\Test.pdf"
    'Initialize Acrobat by creating App object
    gApp = CreateObject("AcroExch.App")mypddoc = CreateObject(
    "AcroExch.PDDoc") 
    gApp.Show()
    mypddoc.Open(gPDFPath)
    gAvDoc = CreateObject("AcroExch.AVDoc") 
    gAvDoc = mypddoc.OpenAVDoc("testing")acroPageView = gAvDoc.GetAVPageView()
    acroPageView.GoTo(1)
    myhitlist = CreateObject(
    "AcroExch.HiliteList")myhitlist.Add(50, 10)
    mypdpage = acroPageView.GetPage() 
    textSelect = mypdpage.CreateWordHilite(myhitlist)
    gAvDoc.SetTextSelection(textSelect)
    gAvDoc.ShowTextSelect()
    mypddoc.Save(PDSaveFull, gPDFPath)
    gAvDoc.Close(True)

  • Editing text from pdf file

    how to edit text from pdf file?

    Adobe Reader does not allow editing the text of a PDF document. You will need to get Acrobat on your Windows or Mac to do that.

  • How can I prevent a PDF file from being copied, printed or downloaded? Students should only be able to view the text and and not distribute it in any way.

    How can I prevent a PDF file from being copied, printed or downloaded? Students should only be able to view the text and and not distribute it in any way.

    You can prevent it from being printed by applying a security policy to it
    in Acrobat. The rest can't be prevented, unless you spend  a LOT of money
    on DRM protection.

  • How to use OCR Font A type by the time of writing some text into Pdf fil

    Hi,
    I am generating one pdf file in java. How can I use OCR Font A for text of pdf file ..Please can any one help where can I get OCR Font A and how to use that one in java ... I want to write some text into pdf file and that text should use OCR Font A family ...
    Thanks.

    This document shows how to disable OCR during conversion; just do the opposite: https://forums.adobe.com/docs/DOC-3062

  • I cant use the highlight, underline, or strikethrough function in a specific pdf file. The file isnt locked. I used to highlight texts from that file before the latest update. The problem occurs only with that file. Urgent need. Please help. Thanks!

    i cant use the highlight, underline, or strikethrough function in a specific pdf file. The file isnt locked. I used to highlight texts from that file before the latest update. The problem occurs only with that file. Urgent need. Please help. Thanks!

    Chester31,
    Thank you very much for sharing your file with us!  Now that we are able to reproduce the problem at our end, you may stop sharing the file on Acrobat.com.
    Do you know when this problem (for not being able to add new highlight/strikeout/underline) has started?  Did you update your iOS from 7.x to 8.0 recently?
    We will continue investigating the problem and let you know what we find.
    Thank you again for your help.

  • How to write a unicode text in pdf file

    Dear Friends,
    I am a beginner in acrobat pdf plug-in development. I was trying to write a unicode text (Tamil text) into pdf file.
    Using same api I am able to write english text in time-roman, areal etc fonts. But I am not able to write tamil texts.
    The code is as below:
            memset(&pdeFontAttrs, 0, sizeof(pdeFontAttrs));
            pdeFontAttrs.name = ASAtomFromString("Latha");
            pdeFontAttrs.type = ASAtomFromString("TrueType");
            pdeFont    = PDEFontCreateFromSysFont(                                        \
                            PDFindSysFont(&pdeFontAttrs, sizeof(pdeFontAttrs), 0),    \
                            kPDEFontCreateEmbedded);
            pdeText = PDETextCreate();
            PDETextAdd(pdeText, kPDETextRun, 0, (ASUInt8 *)buffer, _tcslen(buffer),
                                    pdeFont, &gState, sizeof(gState), NULL, 0, &textMatrix, NULL);
            PDEContentAddElem(pdeContent, kPDEAfterLast, (PDEElement)pdeText);
            PDPageSetPDEContent(pdPage, gExtensionID);  
            PDPageReleasePDEContent (pdPage, gExtensionID);
    KIndly assume that PDEGraphicsState and PDETextMatrix are set properly set, I am not pasting entire code to avoid complexity.
    Thank you,
    Safiq

    Dear lrosenth,
    I went through some codes/suggestions in internet and I found that I need to have cmap file and cid font file for the respective font since pdf doesn't support unicode fonts directly.
    Can you help me to know where can I get cmap file and cid font file for tamil language font Latha(TrueType) microsoft font.
    Regards,
    Safiq

  • Extract highlighted text in PDF

    Hi,
      I want to write a tool which can extract highlighted text from the pdf and export the text into another pdf file. Can somebody give me directions how to do that.
    if you think some tool already has that capacity, please let me know. Most of the tool I know just extract the summary like the location of the highlighted portion but not the actual text associated with it.
    reards,
    Avesh

    Hi,
    The question relating to extract text from pdf file is beyond the scope of c# forum , please try to refer to:
    http://www.adobe.com/support/acrobat/
    HarryPlease remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.

  • How to highlight text with Adobe Reader XI?

    email [email protected]

    Thanks. The PDF file was made from a web site article and I guess this is the same as scanned as I cannot highlight.  The cursor changes but cannot highlight what I want.
    I was able to add text and I did this in Red and will ask the VA to read under the sections marked in Red.
    Thanks,
    Vernon Pobanz
          From: ~graffiti <[email protected]>
    To: vernon pobang <[email protected]>
    Sent: Tuesday, October 7, 2014 11:57 AM
    Subject:  How to highlight text with Adobe Reader XI?
    How to highlight text with Adobe Reader XI?
    created by ~graffiti in Adobe Reader - View the full discussionUse the highlight tool under Comment>Annotations. This will only work if the pdf isn't a scanned image. If that is the case, there is no text to highlight. Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at https://forums.adobe.com/message/6800192#6800192 Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page:  To unsubscribe from this thread, please visit the message page at . In the Actions box on the right, click the Stop Email Notifications link.  Start a new discussion in Adobe Reader by email or at Adobe Community For more information about maintaining your forum email notifications please go to http://forums.adobe.com/thread/416458?tstart=0.

  • How do I combine already pdf files in pack?

    How do I combine 2 pdf files in adobe pack?

    So, if you have a PDF pack account, make sure to log in.
    Online, you would go to https://cloud.acrobat.com/combinepdf, by clicking on the "Combine Files" tab.
    Next, click the large blue button that says, "Select Files to Combine."
    Wait for the shadow-box window to appear, and select the PDF files you want to combine, either by selecting them in your computer's filesystem, from the pop-up window, or by dragging the files into the shadow-box.
    Alternatively, you may switch to Acrobat.com files, and upload any files that you have stored there.
    Click on the blue button stating continue.
    Enter a name in the box with light gray text stating "Enter combined PDF file name"
    When done, press combine.
    You should see a light grey status box in the top right stating the status of the combining, and when finished, you will see the file appear in the section toward the bottom half of your browser stating "Combined Files" - it should be the document to the furthest left-side. (If your lucky, it is already there.)
    Hopefully, this will help you!
    -Alex
    Like what you see? Is it a correct answer? If so, you should vote a correct answer on this answer.
    You, too, can be an awesome user - just remember - see something, say something!@

Maybe you are looking for