PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

Problems with Highlighting PDFs with Javascript

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problems with Highlighting PDFs with Javascript

    I've looked through the Forum for a solution to my problem with no success. I have everything working except I cannot get the search term to be highlighted in a pdf document. The term is, however, highlighted in the Title of the document when it is displayed in the search results page.

    I am using the Javascript option and all my files are pdfs. I have Adobe Professional version 7.09.

    I have:
    Configured the pdf indexing options on the "Scan Options" tab.
    Checked both options in the highlighting options.

    And, I know I supposed to put the highlight.js in the default directory but, as you know, can't put a link to it in the pdf files. I have, however, referenced it in the search.html file.

    One thing is that I have used categories to index 3 separate directories. I wasn't sure if the highlight.js needed to go in each directory?

    Am I totally making too much out of this??

    Thanks,

    Patty
    Last edited by pday; Apr-30-2007, 08:45 PM. Reason: Specify version of Adobe

  • #2
    You're using the wrong option. The "Jump to match and highlight within document" option (and the "highlight.js" Javascript) does not apply for PDF files, only HTML files.

    This is documented here:
    http://www.wrensoft.com/zoom/support/highlighting.html

    Note: This feature only works for HTML web pages, and not Word, XLS and other document types. It also will not work with Javascript disabled browsers.

    For highlighting within PDF documents, enable the "Highlight and locate matched words within PDF document viewer" option by double clicking on the ".pdf" extension on the "Scan Options" tab of the Zoom Configuration window
    --Ray
    Wrensoft Web Software
    Sydney, Australia
    Zoom Search Engine

    Comment


    • #3
      Still can't get it

      I'm still experiencing problems. I thought maybe it was the way we create our Acrobat files (image with text behind), but tried just converting a document directly from Word and that didn't work either.

      It doesn't seem to be rocket science, but I can't get it to work...any other suggestions?

      I tried uninstalling and reinstalling the software in case some file had become corrupt. I'm sure it's something stupid I've done, but any help would be greatly appreciated.

      Comment


      • #4
        First, make sure you have re-indexed after changing your setting for the PDF highlighting option in the Configuration window.

        If this option is enabled, your search result links will point to URLs with a "#search=" parameter at the end. Eg.
        http://www.mysite.com/myfile.pdf#search="mysearchword"

        If this is not the case, then the setting has not been enabled properly.

        Now, if this parameter is in place, and the words are still not being highlighted or found within Acrobat Reader, then the problem is either with the PDF file itself, or your version of Acrobat. Note also that there are limitations with the capabilities of Acrobat Reader and it will not support exact phrase matching or substring matching (see the Help file for more information).

        If you continue to have problems, please provide the URL to the PDF file in question (and your search page if they are both online) and we can take a closer look. Or e-mail us the PDF file if required.
        Last edited by Ray; May-02-2007, 03:42 AM.
        --Ray
        Wrensoft Web Software
        Sydney, Australia
        Zoom Search Engine

        Comment


        • #5
          Still not working and...

          It's still not working. I am getting the a"#search=" parameter at the end, eg.
          http://www.mysite.com/myfile.pdf#search="mysearchword", but no highlighting.

          I am also unable to search for phrases. When I do search for a phrase, eg., "operator training", using all words selected radio button, it returns documents that contain both words but does not limit the search to the phrase. In fact, when the search results are returned, the quotes in the search box are gone, replaced with spaces.

          Any ideas?

          Thank again.

          patty

          Comment


          • #6
            Update

            I loaded the files up to our webserver and the words highlight beautifully, so it appears to be a problem with the CD-Rom based search.

            The phrase search, however, continues to perform the same way.

            Any ideas on why the highlighting works on the web but not on the CD-based search?

            Anyone out there??? You can try it at http://www.nus.com/zoom/index.htm.

            Thanks for any assistance.

            patty

            Comment


            • #7
              First of all, you are using the Javascript search platform. The exact phrase feature is not available for Javascript (the weakest scripting platform due to its technical limitations) - it is only available for PHP, ASP, and CGI. You can see a list of other features excluded in Javascript here:
              http://www.wrensoft.com/zoom/features.html

              Second, note that even with the other platforms, you will need to enable exact phrase searching for it to work. This is on the "Search Page" tab of the Configuration window (greyed out for Javascript).

              If you can see the "#search=" parameter is added to the URL then things should be working, and if not, the problem may be elsewhere (eg. Acrobat's known to be a bit of a setup nightmare on most machines).

              To confirm though, can you tell us what base URL you are using for the CD version? (which would certainly have to be different from your online version for it to work). Perhaps you should e-mail us your ZCFG file and we can take a look at that.
              --Ray
              Wrensoft Web Software
              Sydney, Australia
              Zoom Search Engine

              Comment


              • #8
                More info

                Ahhhh, the "fine" print! But, you were right, I didn't see that exact phrase checkbox that is greyed out.

                The base URL I'm using is ./

                Where should I send the zcfg file?

                Thanks again!
                patty

                Comment


                • #9
                  Support E-Mail contact details are here.

                  Comment

                  Working...
                  X