dtSearch Publish

PDF Highlighter Publisher Edition enables use of PDF highlighting with re-distributable search applications and publications such as those produced by dtSearch Publish.

PDF highlighting components for portable media do not require any special setup on the end-user's system and are fully functional in an offline environment. PDF Highlighter server installation is only needed on the system where the master CD is created.

PDF highlighting components are compatible with all three dtSearch Publish interface types (Standard viewer, local, and Microweb HTTP server).

Updating dtSearch CD Publication

Copy the following PDF Highlighter assets to your CD's master folder:

Highlighter Asset

CD Location

pdf-viewer\
jquery.pdf-highlighter.js
jquery-1.12.4.min.js
root\data\
dtpub_pdf_highlights.exe
dtpub_pdf_index.exe
root\cgi-bin\

Next, add PDF Highlighter initialization script to the search results template. Open dtSearch_options.html using a text editor, lookup for the "ResultsScript" section, and just above its $End line add:

<script src="jquery-1.12.4.min.js"></script>
<script src="jquery.pdf-highlighter.js"></script>
<script>
 
$(function() {
$('.ResultsTable a').pdfHighlighterForDtPublish();
});
 
</script>

This will update all links to PDF documents to open in Highlighting PDF Viewer.

Building PDF Highlighter Cache

To build the cache for PDF highlighting, run dtpub_pdf_index.exe (it's fine to double click in Windows Explorer). With its default settings, it will automatically index all PDF files under CD's root\data using the PDF Highlighter service installed on the same system. PDF cache data will be saved to the root\pdf-cache folder.

If you need to change any of these defaults, go to the command line and run "dtpub_pdf_index -h" for the list of available options.

During the runtime, when the PDF file open is requested, dtpub_pdf_highlights.exe uses the cache to build search term highlighting information for the HTML5 PDF viewer. This is automatically wired by the JavaScript added to the dtSearch options file.

After the cache is generated, the PDF Highlighter service is not needed any more and can be stopped.

Troubleshooting

Q: When opening a PDF file in dtSearch Viewer, there is a script error like Expected ':' in URL http://localhost/pdf-viewer/pdf.viewer.js

A: Embedded IE instance running in dtSearch Publish Viewer opened document in compatibility mode emulating older IE version which doesn't work in HTML5 PDF viewer. To make it run in the highest available compatibility mode, open dtSearch.html in editor and just below the line with <head>, add:

<meta http-equiv="X-UA-Compatible" content="IE=edge">


comments powered by Disqus