Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Where can I find and install the Adobe Search Plug-in?

New Here ,
Jun 10, 2016 Jun 10, 2016

Wow, am I frustrated!!  I can't believe I can't find how to get and install the Adobe Search Plug-in so I can leverage the Search Object in my code.  .FindText has been too unreliable for me and after researching for hours, I finally learned about the Adobe Search Plug-in that seems like it overcomes all the problems with .FindText.  But nothing online or in the Acrobat SDK help documents mentions where I get it from.  I have the latest version of Acrobat Pro DC and the SDK.  Anyone know where I get it?

TOPICS
Acrobat SDK and JavaScript
3.8K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 11, 2016 Jun 11, 2016

It is part of Adobe Acrobat.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 11, 2016 Jun 11, 2016

Just to expand on Bernd's answer, when you go to "Adobe Acrobat>About Adobe Plug-ins" on a Mac, or "Help>About Adobe Plug-ins" on Windows, you will get a list of all installed plug-ins from Adobe:

2016-06-11_08-07-16.png

You cannot search in Acrobat without that plug-in being present and active. It does not matter if you are using search/find from the user interface of the AVApp.FindText method from the IAC API, it's always the search plug-in that does the actual work. I understand that you are not satisfied with what the FindText method is providing, because the user interface allows you to do a lot more, but unfortunately, that's the only API function we have in the IAC API to search. Unfortunately, there is also nothing in the Javascript API, otherwise you could use the JSObject to access JavaScript functionality, but that does not help in this case either.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 11, 2016 Jun 11, 2016

Thanks Karl,

But I'm still stuck.  BTW, it's Help->About Adobe Plugins..., not File->About Adobe Plugins.  Maybe I was confused here because it says "Not Loaded" in the about dialog.  So, I guess it is installed, but I still don't know how to load it.  I've got the full API document, but nothing in it tells me what file to reference, how to create the search object, or how to browse the classes, etc..  Let me give you an example using VBA:

Sub FindMyText()

     dim MySearchObject as Object   ' What can I put here to be more specific than just Object?  I've searched everywhere

                                                          ' and can't find an answer.

     Set MySearchObject = ?????      ' What do I put in here in place of the question marks? 

                                                          ' E.g. what is the class ID for the search object?

End Sub

I've referenced every dll, lib, and ocx I could find on my computer that was related to Adobe.  But nothing gives me a search object and I can't find any of the methods, etc., when I search with the object browser.

But, what's most frustrating, is that I can't find any Adobe documentation, public blogs, or discussion groups that answer the question.  I do find the same question asked a lot, though.

My dissatisfaction with FindText (BTW, I'm using AcroAVDoc.FindText, not AVApp.FindText; are they the same thing?  I can't find any such object/class named AVApp), has nothing to do with the UI features; it simply isn't reliable.  There are several posts, including mine, on the web and in this community asking about the problems, but they are never answered.  E.g., there are at least two posts on here about FindText never returning that have not been answered.  There's also several posts elsewhere about how FindText finds the wrong text.  I've experienced both problems enough that I need to find an alternative.  In my current project, I'm trying to search through large PDF files for the text "Subject:".  But in one case, it finds and selects the word "of"; in another, it finds and selects some random dots in a graphic.  When I do the same find on the same document using the UI, it says it can't find the text. 

Why do  you say the JSObject won't help?  The JSObject.GetPageNthWord() function does a great job.  It's just too slow.  Also, the Search Object documentation in the Acrobat API Reference, documents a lot more functionality than just FindText. 

Also, another problem I haven't been able to solve using FindText is a reliable way to know when you've reached the end of the file in your search.  There are other posts, unanswered, on here about this problem too.  One calls it the infinite loop.  The best solution I've found so far is to check the page number after each find if if the page number is less than the previous page number, I know I've passed the end and wrapped around to the beginning.  But this fails if the search text exists twice, but only on the last page of the document.  I can't seem to get an answer from anyone on this problem too. It would be nice if there was some sort of function that would tell me what word I'm on, not just what page.  E.g., JSObect.GetPageWordNum().  Or even if there as a call I could make to retrieve the rect that contains the word found, I could work with that.

My biggest issues is that the only place I can get support for the Acrobat API is in the community.  Adobe promotes it as "Ask the Experts," but I rarely get any response to most of my postings.  For some reason, I got lots of responses to this one. 🙂  If Adobe wants us developers to write applications to help sell copies of Adobe Acrobat Pro DC, they need to give us access to APIs that work as reliably as the ones they use in their UI, and give us better support.

Enough of my soapbox; can you help me?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 11, 2016 Jun 11, 2016

Here's a link that provides example code of using JSObject to do finds, it also mentions the reliability issues with FindText.  PDF Search Through VBA ~ My Engineering World

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 11, 2016 Jun 11, 2016

Unfortunately, as I've explained before, I cannot help you (and so can nobody else): FindText is what it is and there is no way around it. Yes, via the JSObject, you can use the "Word Finder", but that is very limiting because you can only search for one word at a time, and therefore it's not on par with the FindText method.

You are right, I did mess up the name of FindText, yes, it's AVDoc and not AVApp. If you read my reply again, I did point you to the Help menu (for Windows).

I agree, FindText is not the most reliable function.

Now, if you are happy with the JavaScript getPageNthWord() functionality, you can get the location of that found word via Doc.getPageNthWordQuads()

BTW: It is very dangerous to use the object browser to discover what functionality Acrobat might provide that's outside of the API documentation: Unless something is documented in the SDK, Adobe can remove or change behavior any time they seem fit - and therefore potentially breaking your application. Only if you stick with what the SDK has documented, do you have some guarantee that the functionality will not change on you without any notice.

As TSN already explained, only when you write a plug-in do you have access to the functionality provided via the Search plug-in HFT.

As to why your Search plug-in is listed as "Not loaded" - I don't know. Does the About dialog show other plug-ins that are loaded? Is the search plug-in the only one that is "Not loaded"? Based on the "Help" menu from above, I assume you are using Windows. I would try to repair the Acrobat installation (that function is also in the Help menu). Does that change anything?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 11, 2016 Jun 11, 2016

I'll try repair.  BTW, it also says "Not Loaded" on the screen shot you sent me.  But that's moot since you say FindText requires the plugin and FindText is working (at least most of the time).

Thanks for the warning about the Object Browser, but I'm not new to this.

So, if FindText is unreliable, how are so many apps being written that implement find without encountering the same problems I am?

As I said, getPageNthWord is too slow, but I may give it another look after what you said about getPageNthWordQuads.  Thanks!!

For other readers, another approach is to use Microsoft Word's new Reflow feature to open the PDF file in Word and then do the search using Word's search functionality.  Unfortunately, the Reflow feature is still buggy.  Hopefully it will be fixed in the next release of Office.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 11, 2016 Jun 11, 2016

Repair made no difference. 😞

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 11, 2016 Jun 11, 2016
LATEST

I finally got back to my computer with Acrobat and actually looked at the dialog.

Here is a bit of history: In the olden days, when Acrobat started, all plug-ins that were installed in the directories that Acrobat scans were loaded during startup. That took quite a bit of time, and you had to wait a long time until you actually got to see the document that you wanted to read. Fast forward a few years. Adobe then implemented a on demand loading mechanism that made sure that a plug-in was only loaded when the user actually wanted to use it. That made loading Acrobat much faster, but you now have to wait a little bit longer when you try to access functionality that is implemented in a plug-in. This means that the search plug-in is not always loaded, but it gets loaded when you do your first search operating. So, once you search, the plug-in will show "Loaded: Yes". This does not make any difference in how you use e.g. the FindText method (or the word finder in JavaScript). When Acrobat determines that the search plug-in is needed, it will load it.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 11, 2016 Jun 11, 2016

Could you post a link to the info which seems to lead you to this being a solution to all your issues?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 11, 2016 Jun 11, 2016

Ah, is it this:

 

The Adobe Acrobat Search plug-in allows users to perform text searches in PDF documents. It adds menus, menu items, toolbar button, and a Search panel to the Acrobat viewer.

The Search plug-in exports a Host Function Table (HFT) containing several methods that can be used by other plug-ins.

If so, then you can use this API if you are writing a plug-in in C/C++. However, from your post, we assume you are NOT writing a plug-in.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 11, 2016 Jun 11, 2016

Test Screen Name, that's one of the resources I found, but not the one I was referring too.  I'm trying to hunt down the website I saw.  BTW, I didn't realize the HFT could only be used by other plugins.  I thought I could use DDE to send messages to the plugin from any code/application.  I was just hoping for something faster than DDE.  Also, worth mentioning, it could be that the solutions I found are just wrappers for the DDE interface, but I can't find it.  Here's some sample text I copied from the site, but it doesn't work because I don't have the objects it requires and it didn't say how to get them.  All it said was that I needed the Search Plugin. I was hoping that after installing the Search Plugin, the objects would be defined.  Now I know I already have the Search Plugin, so I need more.

' Ex of using PDFPlusX API
Sub LocateTextExample()

Dim lngPage As Long
Dim lngWord As Long
Dim strSearchText As String
Dim strPDFFile As String
Dim bFound As Boolean
Dim appPDF As Acrobat.AcroApp
Dim docPDF As Acrobat.AcroAVDoc
Dim pdfpxPageWord As tPageWord

strSearchText = "Hello PDF World"
strPDFFile = "C:\Users\Rocket\Documents\PDFPlusX\Docs\Welcome.pdf"

Set appPDF = New Acrobat.AcroApp
Set docPDF = New Acrobat.AcroAVDoc

bFound = False
If docPDF.Open(strPDFFile, "") = False Then
    MsgBox "Unable to open file " & strPDFFile
    Exit Sub
Else
    pdfpxPageWord = pdfpxLocateText(docPDF, strSearchText, False)  ' change last parameter to true
                                                                   ' to highlight/select found text
    If Not pdfpxPageWord.Page = pdfpxEOF Then
        bFound = True
        lngPage = pdfpxPageWord.Page
        lngWord = pdfpxPageWord.Word
        MsgBox "Text Found on page " & lngPage & ", word " & lngWord
    Else
        MsgBox "Text not found"
    End If
   
    Do While bFound = True
        pdfpxPageWord = pdfpxLocateNextText()  ' Assumes same parameters as pdfpxLocateText
                                              
        If pdfpxPageWord.Page = pdfpxEOF Then
            bFound = False
        Else
            lngPage = pdfpxPageWord.Page
            lngWord = pdfpxPageWord.Word
            MsgBox "Text Found on page " & lngPage & ", word " & lngWord
        End If
    Loop
End If
End Sub

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines