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)

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 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)

  • 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)

  • 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.

  • 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 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

  • Why can't I "Save as Text" a pdf file received as an email attachment?

    I can "Save as text" a pdf file which I have created in my own computer (that is, it goes into MS notebook that I then can Copy and Save as an MS Word file) but not when I receive a pdf as an email attachment. (The file is saved, but it is empty.) Why would I want to convert my own pdf back to text? Well, in case I no longer have the original Word document I suppose, but the thing is "Save as text" works with my pdf, but not with those I recieve from others. How come? Thanks!

    Is this a scanned PDF? If so, it must first be OCR'd.

  • Highlight text in pdf

    How do I highlight text in pdf in iBooks? Can't seem to do that...

    iBooks is pretty feeble with PDF. There are many other pdf readers available that have many more features. Goodreader, iannotate, etc.

  • Read text in pdf files

    Hi Ppl,
    Is it possible to read text from pdf file ? We can use activex controls to open and display pdf files, but these activex doesn seem to support reading of text from these pdf files. Help me out plz.
    Thanks 

    The full PDF format is VERY complex. Probably the reason why PDFBox was choking on one of the PDF files of a former poster. You are of course free to implement a PDF parser in LabVIEW but expect this to be a project where a man year of effort certainly won't be enough to even get close to what PDFBox can do. Then decide if you want to give it away for free just for the good karma of it, or attempt to sell it with a potential of maybe one license every year.
    Just look at the opposite direction: Creating a PDF file from within LabVIEW. There are several Toolkits out there who can do that and they already took a considerable amount of time to develop. Yet the generation of a small subset of PDF features in a file is several exponents easier than parsing and interpreting any exisiting PDF document that might have been created by tools like Adobe Acrobate, with Adobe as the creater of PDF potentially using all the bells and whistles they eventually put into the PDF standard over those two or more decades, including quite a few bugs that eventually got documented as a feature.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Insert Text in PDF files?

    Prior to reformating my computer, I was able to insert text into pdf files.
    Now I am not seeing the instert text option, can you assist.
    Neil Borne
    Moderator's Note: Removing personal details.

    Thank you and it would appear that it should work, but I must click on the
    Comment Box far top right;
    When choosing Text, I receive the "Failed to load Application resource
    (internal Error).
    I have looked for updates, none available. I have also clicked on repair
    installation.
    What should I do next?
    Neil

  • Read the text in pdf file

    Dear all,
    I have checked a lot of post about reading pdf in this forum. However, is it possible to read the text in pdf file. In my case, I need to read the content of pdf to do further process. Could anybody give me some suggestions. Thank you.

    I have a similar problem, can anybody help us....

  • 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

  • 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.

Maybe you are looking for

  • Report on Campaign-Recipients.

    Hi, Im trying to track the no of contacts who attended campaign,received the campaign invite & who declined/did not attend the campaign. Also from the no. of contacts who attended the campaign, how many actually got converted to leads. Help required

  • Dreamweaver CS6 & Business Catalyst  don't play together

    When I try to start a new BC site, or import a BC site the contect to server box appears. Then the Adobe Application Manager window pops up with a circling animation in the middle and stays there forever. When I start the AAM on it's own it starts fi

  • Trying to inherit a super constructor

    Lets suppose I have a parent and child. public class Parent{ public Parent(String string){ //do some stuff here public class Child{ and finally some other class using the child pubilc class myChildTester{ pubilc static void main(String[] args){ Child

  • Have OSX & OS 9. Can't change chooser in OS 9 for new printer.

    Hi - Here I am hours later. Please help. I have a new printer ip4200. I am running both OS X and OS 9. All is well with OS X and printer, but I can not get the ip4200 to show up on my OS 9 Chooser. It shows 4 items: AppleShare, FaxPrint, LaserWrier8

  • Re: How to avoid APPS password displayed in Unix box  .

    Hi How to avoid APPS password displayed in Unix box by using ps command for concurrent program with execution method set as "host" . Regards .