Integration FAQ

Q: How to highlight all terms with the same color?

You can do this by adding "colors" array to the end of Highlighter's application.conf:

highlighter.pdf.multiColorHighlighting.colors = ["FFFF00"]

If you created config file from provided sample, lookup for "multiColorHighlighting" section and update "colors" there.

Q: Serving local files works for documents on C: drive but not for a network mapped drive?

By default, PDF Highlighter on Windows is installed as a service which is running as system user and does not have access to user-mapped network drives. The simplest workaround to make this work in PDF Highlighter is to setup mapping to use UNC path to your network share. See an example.

Q: How to open highlighted PDF in an IFRAME?

Run highlighting using JavaScript with an extra HTTP request header "Accept: application/json". JSON object that you get in response will have field "documentUrl" which you can use as iframe source.

Q: How to prevent HTTP redirection to document viewer and get highlighted PDF (burned) back in highlighting method response?

The simplest approach to this is adding HTTP request header "Accept: application/pdf" to your highlighting request.

If setting the header is not convenient to you for any reason, you can send request parameter "req.accept" instead.

Q: When highlighting a document for a search query, why doesn't the number of terms highlighted match the number of hits reported by my search engine?

Search query interpretation depends on the search software used and also its settings. The text analysis/search engine that is built in Highlighter is very flexible, but the highlighted document may still find more or less words than your search engine. This is mostly affected by language specific settings (e.g. does your search engine have stemming or thesaurus enabled, how does it handle stop words, etc.)

If your search engine has language options enabled, make sure you send the "language" parameter to highlighter as well.

Q: I'm using dtSearch and when I search for a phrase, in PDF viewer all words of the phrase are marked as separate hits. Why?

Format of the PDF highlight file, which is used with dtSearch, does not contain any information about search queries and relation between found words. Without additional info, PDF Highlighter is not aware of phrase use and cannot mark it as such. As of v4.2, PDF Highlighter supports phrase highlighting with additional hit details from dtSearch.


comments powered by Disqus