lbvProt.dll provides a way to highlight hits in PDF files using an Asynchronous Pluggable Protocol. This mechanism only works with an in-process WebBrowser control.
The procedure to highlight hits in a local PDF file that was retrieved in a search is as follows:
First, set up your project to use lbvProt.dll, which is a COM compoent.
1. Register lbvProt.dll if it is not yet registered. To do this, open a Command Prompt window as Administrator and execute this command in the dtSearch BIN folder: regsvr32 lbvProt.dll
2. In your .NET project, add a reference to "dtSearch lbvProt.dll Type Library" to your project (it will be in the COM tab of the Add Reference dialog box).
Next, in the code that displays PDF files after a search, do the following to display the PDF file with hits highlighted:
In a .NET application, add a reference to the lbvProt.dll component to your project to access it using COM interop.
C# Sample (using COM interop)
if (pdfHighlighter == null)
pdfHighlighter = new lbvProt.LocalProtocol();
String hl = searchResults.MakePdfWebHighlightFile();
String url = pdfHighlighter.MakePdfUrl(searchResults.DocName, hl);
webBrowser.Navigate(url);The URL returned by lbvProt.dll only works with an in-process WebBrowser control. Because lbvProt.dll is in the same process as the WebBrowser control, it can redirect the WebBrowser control to the correct location for the PDF file and XML highlight data.
If you open a separate Internet Explorer window, it will not be able to use the the URL, because lbvProt.dll will not be running in the same process as the Internet Explorer instance.
Because Adobe Reader does not currently run as a 64-bit application, PDF hit highlighting can only be done in 32-bit applications. A 64-bit application will not be able to invoke Adobe Reader except by launching it in a separate process.
|
Copyright (c) 1995-2012 dtSearch Corp. All rights reserved.
|