FindText doesn't work in Acrobat X

I have installed the Adobe Acrobat software development kit and until the Acrobat 9 the FindText function works correctly.
With Acrobat X (last update 10.1.3) the FindText doesn't work.
When you solve this malfunction? Is it possible to have a valid alternative?
Thanks in advance.
PS. This issue is similar to the following:
http://forums.adobe.com/thread/826756
http://forums.adobe.com/message/3762837

I have the same problem, looks like a bug to me...
I did found a workaround, although it's much slower. (Especially if you don't have the start page number)
The code exists of a class and a module. It will need to be adjusted for your own usage...
Hope it can help you...
Sorry for type faults (Native dutch speaking)
Module:
Option Compare Database
Option Explicit
Public clsFind As clsAcroFind
'Call on form load
Public Sub SetClass()
    Set clsFind = New clsAcroFind
    clsFind.AcroApp_Init
    clsFind.AcroPDDoc_Init
End Sub
'Call on form unload/close
Public Sub UnloadClass()
    If Not clsFind Is Nothing Then
        clsFind.AcroPDTextSelect_Unload
        clsFind.AcroAVDoc_Close
        clsFind.AcroAVDoc_Unload
        clsFind.AcroPDDoc_Close
        clsFind.AcroPDDoc_Unload
        clsFind.AcroApp_Close
        clsFind.JSO_Unload
        Set clsFind = Nothing
    End If
End Sub
'Find and highlight text in PDF
Public Function FindTextInPDF(ByRef frm As Form)   
    If clsFind Is Nothing Then
        Call SetClass
    ElseIf clsFind.AcroApp Is Nothing Then
        clsFind.AcroApp_Init
        clsFind.AcroPDDoc_Init
    End If
    clsFind.SearchText = 'Your search text
    clsFind.PageNr =  'Your start page number
    If clsFind.Initialised = True Then
        If clsFind.FileName <> FileName Then
            clsFind.AcroAVDoc_Close
            clsFind.AcroPDDoc_Close
            clsFind.FileName = 'Your PDF filename
            clsFind.Path =  'Your PDF full path (incl. filename)
            If clsFind.CheckPath = True Then
                clsFind.AcroPDDoc_Open
                clsFind.AcroAVDoc_Open
            Else
                MsgBox "File not found:" & vbCrLf & clsFind.Path, vbExclamation
                Exit Function
            End If
        End If
    Else
        clsFind.FileName = 'Your PDF filename
        clsFind.Path =  'Your PDF full path (incl. filename)
        If clsFind.CheckPath = True Then
            clsFind.AcroPDDoc_Init
            clsFind.AcroPDDoc_Open
            clsFind.AcroAVDoc_Open
        Else
            MsgBox "File not found:" & vbCrLf & clsFind.Path, vbExclamation
            Exit Function
        End If
    End If
    clsFind.JSO_Init
    clsFind.FollowInPDF
End Function
Class: (clsAcroFind)
Option Compare Database
Option Explicit
Private cPath As String
Private cFileName As String
Private cSearchText As String
Private cPageNr As Integer
Private cInitialised As Boolean
Private cAcroApp As Acrobat.cAcroApp
Private cAcroPDDoc As AcroPDDoc
Private cAcroAVDoc As AcroAVdoc
Private cAcroRect As AcroRect
Private cAcroPDTextSelect As AcroPDTextSelect
Private cJSO As Object
'********************************************** Properties **********************************************
Public Property Get Path() As String
    Path = cPath
End Property
Public Property Let Path(val As String)
    cPath = val
End Property
Public Property Get FileName() As String
    FileName = cFileName
End Property
Public Property Let FileName(val As String)
    cFileName = val
End Property
Public Property Get SearchText() As String
    SearchText = cSearchText
End Property
Public Property Let SearchText(val As String)
    cSearchText = val
End Property
Public Property Get PageNr() As String
    PageNr = cPageNr
End Property
Public Property Let PageNr(val As String)
    cPageNr = val
End Property
Public Property Get Initialised() As Boolean
    Initialised = cInitialised
End Property
'********************************************** Properties **********************************************
'********************************************** Object Set **********************************************
Public Property Get AcroApp() As Acrobat.cAcroApp
    Set AcroApp = cAcroApp
End Property
Public Sub AcroApp_Init()
    Set cAcroApp = CreateObject("AcroExch.App")
End Sub
Public Sub AcroApp_Close()
    If Not cAcroApp Is Nothing Then
        cAcroApp.Exit
        Set cAcroApp = Nothing
    End If
End Sub
Public Sub AcroPDDoc_Init()
    Set cAcroPDDoc = CreateObject("AcroExch.PDDoc")
End Sub
Public Sub AcroPDDoc_Open()
    cAcroPDDoc.Open cPath
    cInitialised = True
End Sub
Public Sub AcroPDDoc_Close()
    If Not cAcroPDDoc Is Nothing Then
        cAcroPDDoc.Close
    End If
    cInitialised = False
End Sub
Public Sub AcroPDDoc_Unload()
    Set cAcroPDDoc = Nothing
End Sub
Public Sub AcroAVDoc_Open()
    Set cAcroAVDoc = cAcroPDDoc.OpenAVDoc(cFileName)
    While cAcroAVDoc Is Nothing
        Set cAcroAVDoc = cAcroApp.GetActiveDoc
    Wend
    cAcroAVDoc.BringToFront
    cAcroAVDoc.Maximize 1
End Sub
Public Sub AcroAVDoc_Close()
    If Not cAcroAVDoc Is Nothing Then
        cAcroAVDoc.Close True
    End If
End Sub
Public Sub AcroAVDoc_Unload()
    Set cAcroAVDoc = Nothing
End Sub
Public Sub AcroPDTextSelect_Unload()
    Set cAcroPDTextSelect = Nothing
End Sub
Public Sub JSO_Init()
    Set cJSO = cAcroPDDoc.GetJSObject
End Sub
Public Sub JSO_Unload()
    Set cJSO = Nothing
End Sub
'********************************************** Object Set **********************************************
'********************************************** Functions ***********************************************
Public Function CheckPath() As Boolean
    If Dir(cPath, vbNormal) = "" Then
        CheckPath = False
    Else
        CheckPath = True
    End If
End Function
Public Sub FollowInPDF()
    Dim oAcroRect As AcroRect
    Dim arr() As String
    Dim arrQ As Variant
    Dim bFound, Gevonden As Boolean
    Dim j, k, page, nwords As Integer
    On Error GoTo ErrorHandler
    arr = Split(cSearchText, " ")
    If cJSO Is Nothing Then
        Call AcroApp_Init
        Call AcroPDDoc_Init
        Call AcroPDDoc_Open
        Call AcroAVDoc_Open
        Call JSO_Init
    End If
    '**************************** In Case a page nr was given ****************************
    If cPageNr <> 0 Then
        page = cPageNr
        nwords = cJSO.getPageNumWords(page)
        For j = 1 To nwords - 1
            Gevonden = True
            For k = 0 To UBound(arr)
                If cJSO.getPageNthWord(page, j + (k - 1)) <> Left(arr(k), Len(cJSO.getPageNthWord(page, j + (k - 1)))) Then
                    Gevonden = False
                End If
            Next
            If Gevonden = True Then
                arrQ = cJSO.getPageNthWordQuads(page, j)
                Set oAcroRect = CreateObject("AcroExch.Rect")
                oAcroRect.Left = 'Set left rectagle boundery
                oAcroRect.Right =  'Set right rectagle boundery
                oAcroRect.Top = arrQ(0)(1)
                oAcroRect.Bottom = arrQ(0)(5)
                Set cAcroPDTextSelect = cAcroPDDoc.CreateTextSelect(page, oAcroRect)
                If Not cAcroPDTextSelect Is Nothing Then
                    cAcroAVDoc.SetTextSelection cAcroPDTextSelect
                    cAcroAVDoc.ShowTextSelect
                Else
                    MsgBox "Not Found!", vbExclamation
                End If
                GoTo Finalize
            End If
        Next
    End If
    '**************************** In Case the pagenr was given ****************************
    '***** In Case the pagenr was absent or the searchtext wasn't found on given page *****
    For page = 1 To cAcroPDDoc.GetNumPages - 1
        nwords = cJSO.getPageNumWords(page)
        For j = 1 To nwords - 1
            Gevonden = True
            For k = 0 To UBound(arr)
                If cJSO.getPageNthWord(page, j + (k - 1)) <> Left(arr(k), Len(cJSO.getPageNthWord(page, j + (k - 1)))) Then
                    Gevonden = False
                End If
            Next
            If Gevonden = True Then
                arrQ = cJSO.getPageNthWordQuads(page, j)
                Set oAcroRect = CreateObject("AcroExch.Rect")
                oAcroRect.Left = 'Set left rectagle boundery
                oAcroRect.Right =  'Set right rectagle boundery
                oAcroRect.Top = arrQ(0)(1)
                oAcroRect.Bottom = arrQ(0)(5)
                Set cAcroPDTextSelect = cAcroPDDoc.CreateTextSelect(page, oAcroRect)
                If Not cAcroPDTextSelect Is Nothing Then
                    cAcroAVDoc.SetTextSelection cAcroPDTextSelect
                    cAcroAVDoc.ShowTextSelect
                Else
                    MsgBox "Not Found!", vbExclamation
                End If
                GoTo Finalize
            End If
        Next
    Next
    '***** In Case the pagenr was absent or the searchtext wasn't found on given page *****
    MsgBox "Item not found!", vbExclamation
    GoTo Finalize
ErrorHandler:
    MsgBox Err.Description
Finalize:
    Set oAcroRect = Nothing
End Sub
'********************************************** Functions ***********************************************

Similar Messages

  • SDK function FindText doesn't work from Acrobat X

    I have written this question more than one time in this forum, but Adobe developers do not reply.
    See the object. Other details it is possible to find in the following discussions:
    http://forums.adobe.com/thread/826756
    http://forums.adobe.com/message/3762837
    https://forums.adobe.com/thread/1032471
    https://forums.adobe.com/message/6080063
    https://forums.adobe.com/message/4646354
    https://forums.adobe.com/message/6531764
    If Adobe developers want to solve this problem, I am available for any trial or details (also source code that it works with Acrobat 9 and it doesn't work from Acrobat X).
    Regards

    This is a place for developers to help each other. If you want to contact developer support (of course, you will not reach actual developers of the product), you can pay to raise a support case. I can tell you their first question: does it work with Acrobat XI? There will be no fixes for Acrobat X.

  • Function app.mailmsg doesn't work in Acrobat 9.4.2.220

    Hello all:
    Today I update Acrobat 9 from 9.3 to 9.4.
    I find the function app.mailMsg() doesn't work any more.
    when I use app.mailMsg() in Javascript, the Acrobat will be aborted and send Error Report.
    Is anyone able to help me with this?
    Many thanks!

    I have tried your suggestion (for example cPdfAVDoc->FindTextA(WideString("R1").c_bstr(), 0, 0, 1);
    but the result is the same.
    Searching directly in the find window of the Acrobat in my application obviously all works correctly. But my target is to search from an external button.
    Thanks

  • PDF App works fine on Acrobat 7 but doesn't work in Acrobat 8/9

    Hello,
    I have a PDF application that has been working fine in Acrobat 7 for years (for a Fortune 50 company). We had to upgrade our environments to Acrobat 8/9 and the same app either HANGS or Shuts Down when opened in Acrobat 8/9 (Reader and Professional). When I timed some sections of the code, I got down to the following statement (Click action of a button):
    xfa.host.resetData(Home.APHomeSF.somExpression)
    Where Home is a subform on page 1 and APHomeSF is a subform within Home form. This statement takes a fraction of a second in Pro 7 but 18 seconds in Pro 8. The APHomeSF subform has a checkbox, text field, date field and a button. Even when I changed the reset statement to resetting ONLY the checkbox:
    xfa.host.resetData(Home.APHomeSF.FCB.somExpression)
    Pro 8 still took 18 secs to reset the data.  My question is that have any BASIC things changed in Acrobat 8/9 from Ver 7 that are deprecated or not supported, which may cause our application to take longer to run or just shut down.
    I am using Livecycle Designer to edit the application. When I open the application in Livecyle and just save it, I get many "Argument mismatch in property or function argument" errors. Following is one of the places:
    Generating PDF Document...
    Font Service: Default font typeface is Myriad Pro.
    Script failed (language is javascript; context is xfa[0].form[0].CopyContent[0].#subform[0].SPOA[0].SPOAdataRow[0])
    script=viahScripts.noViahNulls();
    var groupsArray = Builder.variables.soScript.getGroupsArray();
    var name = CopyElementName.rawValue;  // PROBLEM LINE
    Error: Argument mismatch in property or function argument
    Now, when I delete the line "var name = CopyElementName.rawValue" with the comment PROBLEM LINE, the error goes away. CopyElementName is just a drop-down list.
    I don't understand what is wrong in this line for it to cause the Argument mismatch error.
    Any help will be appreciated.... THANKS!
    Sunny

    You should post this in the LiveCycle Designer forum.

  • "Providing interactive database lookup from forms" sample doesn't work with Acrobat Reader 7

    I have downloaded and tested the Adobe sample "Adobe LiveCycle Designer 7.0, Providing interactive database lookup from forms". Everything works great in Acrobat Professional Full version, however, when I tested it in Acrobat Reader 7.0.5, it generated a "script failed..." message.
    Did anybody have the same problem? You can download the sample from here:
    http://partners.adobe.com/public/developer/en/livecycle/lc_designer_db_lookup_tip.pdf
    Thanks a lot in advance!
    Jie

    Hi Jie,
    Database connectivity is a feature supported in Acrobat only , not Reader--unless the PDF has been extended with Adobe LiveCycle Reader Extensions.
    http://www.adobe.com/products/server/readerextensions/main.html
    See "Table 3: Form capability support for Adobe Acrobat and Adobe Reader" at:
    http://partners.adobe.com/public/developer/en/tips/lc_combine_server_tip.pdf
    Evangelos

  • Submit by email doesn't work in Acrobat Reader to send PDF

    I am making a fillable PDF and users on Acrobat Reader cannot email pdf, only data file. I need them to be able to send a pdf. What am I doing wrong?

    Don't use the regular "'submit by email button." If you use this button, you can only submit the data as XML. Instead, make your own button.
    In the Object library under Standard objects, click and drag a plain button to your form. Change the Control Type to Submit. Now you should have a new tab called Submit with a "submit to URL" option.  In that field type the return email address in the following format:  mailto:[email protected]  Toward the bottom of the same option, there is a field that says "submit" and the choice is XML data package.  Change that to PDF.  Then change the name of the button to "Submit by Email."  Now when you preview your form and click the Submit by Email button, it should mail the completed form as a PDF instead of simply mailing the raw data.

  • Create a PDF from webpage using entire site option doesn't works

    OK, guys, this is the problem...
    After YEARS of testing from Acrpbat 4 thru 9 on Create a PDF from webpage using entire site option... it doesn't works properly and doesn't got the entire site. ALWAYS get an error of memory or any other error but FINALLY you NEVER got the entire site. I'm talking for a big website... not like amazon.com, but a big one.
    I make a walkarround to try to capture the website in parts but Acrobat is not "intelligent" to make a resume capture of the site, because ALWAYS start from the begining instead from the resume position of the site...
    My question is, HOW can get the ENTIRE SITE in a PDF document... without getting errors or stopping the capture process...
    Don't have problem of low RAM memory because I'm in a MONSTER MACINTOSH.... 3.2 GHZ with 8 Core and 32 GB of RAM under Mac OS X Leopard 10.5.6 in Acrobat 9 Pro.
    If I'm not wrong, the GET ENTIRE SITE option in Web Capture (Create a PDF from webpage using entire site option) doesn't works from Acrobat 4 thru 9 in Pro version... tested, you'll never got the entire site... I'm talking in capture a huge entire site and not a little one...
    Can someone help me?
    Thanks.

    Ok so I go to a web page and select something to print. Once I've clicked print I switch over from printer/micosoft xps docu writer/fax and select Adobe PDF. All goes through with a 'Create Adobe PDF' coming up progressing through to eventually save and store. Once I open the file it end up as the picture above. I have the same version on another computer and that works fine but this particular Sony laptop it doesn't seem to work properly. 

  • I have Adobe Acrobat 9.5.4 installed on my computer and it doesn't work when PDFing

    I have Adobe Acrobat 9.5.4 installed on my computer and it doesn't work when PDFing my document using Microft Word 2010. I have tried using the tab add-in, but it doesn't respond either. The only way to convert my document is to save it as a .pdf from the save as drop down box. I need to be able to have the full functionability of creating a PDF document with the tabs and links working.
    Please help!

    From OFFICE 2010 you either have to have AA X or just print to the Adobe PDF printer. You give no information on your operating system or specifically what you mean by PDFing -- there are multiple ways to create a PDF from a WORD document and you have given no information. However, in this case your only choice is to print to the Adobe PDF printer. Otherwise, you need to upgrade Acrobat.

  • Interactive pdf with movies/swf files doesn't work in up-to-date Acrobat Reader

    Hi, I've a CS6 InDesign doc with movies (MP4's from a URL) and a few swf files. When exporting as an interactive pdf, all the links, movies, swf's work fine in my Acrobat Pro. They work fine on other peoples PC's with Acrobat Pro. But on all my clients PC's with up to date Reader, the movies are playing slow, and the pdf just doesn't work as expected. With links to next page etc not working either. They have up dated their Flash Player too. Still not working well.
    Is there a magic fix? Can I re-save this pdf differently so they can experience all the interactive features properly?
    I created a similar pdf last year from CS5, but adding in the movies & links on the pdf. Do I have to do this again?
    Yours, mostly quite fed uply, Gina !

    Is it possible that your client's PC is just a very slow machine? You might consider cutting out some of the interactivity if your PDF is to complex to be handled by less powerful machines.

  • Another BUG in Acrobat 9.4.5 -- Find doesn't work

    I made the mistake of updating to the latest version Acrobat 9.4.5, and discovered that the Find feature doesn't work right.  For example, I enter a word to search in the "Find" box, and click return.  In past versions, the PDF would jump to the first instance of the term or phrase and highlight the word.  Now, the PDF jumps to the page, but doesn't highlight the word!  So... I'm stuck reading through text to find the word, which is a lot of extra work and time that I don't have. This is a critical problem because I search documents for terms all of the time in my job.  
    I've found one workaround that isn't very satisfactory, but it is better than nothing.  Instead of using "Find Next in PDF", I use "Open Full Acrobat Search" which is a command off the Find pull-down menu.  This command opens up a separate window, which is annoying because it disappears behind the document if you need to page through the PDF file. However, if I do the search, it shows all of the instances in a pane in the context of the sentence where it appears.  Then, if I click on the instance of the word in this pane twice (Yes, TWICE), it will highlight the word in the PDF. You cannot use the Find Next button as you could in previous versions, because this function will not highlight the word.  Anyway, given there are other bugs in this release that I've read about in this forum, I'll most likely just go back to the previous version and completely disable the automatic update feature in Acrobat.  I wish going back was a quick process, but I don't think it is.
    I'm also going to tell everyone in my circle of friends to avoid automatically updating Adobe Acrobat in the future. Adobe obviously doesn't test the software well. Wish I could charge Adobe for the time and frustration they've caused me!

    Brianwrx,
         The Acrobat 9.4.5 update bugs where the first "hit" on each page is not highlighted when doing a Find/Search and no longer being able to use Shift & Ctrl on the Pages pane thumbnails to multi-select and move/delete pages are well reported by many to have been introduced coincident with the Acrobat 9.4.5 release and not a MS Windows update.  I'm not sure what is going on with your 9.0.0 Pro Extended.
         For seasoned Adobe to break such commonly used features in Acrobat 9, never have regression tested these basic functions given the 3 month (or longer) release cycle, and not have broke it in Acrobat X doesn't reflect well on their development/test process.  Then, there are web forum recommendations prodding to upgrade to Acrobat X -- which completely changed the User Interface and will result in significant loss of productivity while bridging the learning curve and dealing with new functional/compatibility problems.  Furthermore, it is something how OCR Suspects are never found/flagged in Acrobat 9, and then were finally fixed in Acrobat X (forcing the need for a paid upgrade to get a bug fix and have to relearn the interface to boot).   
         Adobe's poor quality 9.4.5 release update does me more harm than good when considering other settings to improve Acrobat security (turning off Java-Script, not automatically trusting sites from the Win OS security zones, and not allowing the opening of non-PDF file attachments with external applications under the Edit menu - Preferences).  Adobe has made no official commitment to fix its bugs or provide a release date in the 10+ weeks since the awful 9.4.5 code was thrown over the fence to unsuspecting auto-update customers without any practical/simple way to back it off to 9.4.4 -- even though in all probability it will take the programmer one day each to fix the bugs with some additional time to test/release).  It is interesting that there have been no critical Acrobat security issues (as evidenced by no Out-Of-Cycle releases since 9.4.5), which should mean their programmers have more time to fix these bugs and restore stable functionality in 9.4.6.  As for "not being able to use Shift & Ctrl directly on the Pages pane thumbnails to move pages" (another 9.4.5 bug), the circumvention to drag a window around a group of pages, hold down Shift, and drag a window around a second group of pages should be further clarified with the following: Once your blue highlighted contiguous/non-contiguous pages selection is made, be sure to drag a thumbnail graphic directly to move the selection and don't try to drag the blue shaded perimeter area (which results in clearing the blue highlighting).  This does provide a decent circumvention for that bug -- as compared to the cumbersome "Full Acrobat Search - Advanced Search Options - double-clicking each Result line" circumvention for the Find/Search first "hit" non-highlighting bug.  I implore Adobe to listen to your customers and please take a "do no harm" conservative approach to updates/enhancements in the future.

  • I have purchased the Acrobat pro subscription for 1 year and have followed the steps to install it. But when i go to start it, It crashes and it does this every time! I have restarted my mac pro and also restarted in safe mode but it just doesn't work! PL

    I have purchased the Acrobat pro subscription for 1 year and have followed the steps to install it. But when i go to start it, It crashes and it does this every time! I have restarted my mac pro and also restarted in safe mode but it just doesn't work! PLEASE HELP!!

    Hi jim1287,po
    Check for the latest updates. Installing latest updates should resolve this problem.
    Also, try to ran disk repair using safe mode in Mac, for instructions please visit: http://support.apple.com/kb/PH14204
    Try enabling root user profile on mac and try to check. OS X Mavericks: Enable and disable the root user
    Regards,
    Ajlan Huda.

  • I purchased Adobe Acrobat Pro XI via email download via the Dell Store yesterday. The product key doesn't work/fit into any of the "Registration" templates I've look through on the Adobe website. Manufacturer Part # 65195473.

    I purchased Adobe Acrobat Pro XI via email download code via the Dell Store yesterday. The product key given doesn't work/fit into the boxes on any of the "Register" pages on the Adobe website. Therefore, although I paid for the product and it is downloaded, it is not "installed" and will not work to print documents from emails, etc.

    Hi williamc48321229,
    You must have received redemption code via email from the reseller.
    Please ensure that you are entering the right code as that would be needed to obtain the serial number for activating the product.
    For more details on this, please refer:
    Find your serial number quickly
    Hope this helps.
    regards,
    Anubha

  • I have upgraded Acrobat Standard from version 8 through time until I am currently using version X, which doesn't work with Office 2013.  Can I upgrade to version Standard XI?

    Over the years I have upgraded Acrobat Standard from version 8 to currently working with version X.
    However, since getting a new laptop it doesn't work with Office 2013.
    Can I upgrade to Standard XI?

    Upgrade pricing now only applies to version 9 and X. So if you have a retail serial number for X, you should be able to upgrade. (Or consider subscription).

  • Submitting a pdf in acrobat 9 (vista) send button doesn't work

    I have created a form in livecycle designer with either "submit by email" (sends xml file) or a submit button with a pdf chosen as submit type. The form works fine in acrobat 9 but when I click on either button and it opens my email client (outlook in windows vista), the "send" button doesn't work. Any ideas?

    I have created a form in livecycle designer with either "submit by email" (sends xml file) or a submit button with a pdf chosen as submit type. The form works fine in acrobat 9 but when I click on either button and it opens my email client (outlook in windows vista), the "send" button doesn't work. Any ideas?

  • Editting PDF documents that were created by a MAC doesn't work because of font incompatability.  How can we get MAC fonts and load in our Adobe Acrobat Pro 9?

    Editting PDF documents that were created by a MAC doesn't work because of font incompatability.  How can we get MAC fonts and load in our Adobe Acrobat Pro 9?

    If it's a Mac font and you're on Windows, you can't. If you are also on a Mac, you'll need to purchase the fonts (fonts are generally non-transferable, like software. One of the reasons pdf exists), install them and try your edits.
    But it's best to edit the original document and create a new pdf when finished.

Maybe you are looking for