Disable the service interaction
This can easily be achieved by setting the service configuration variables to null.
lt.Document.DocumentFactory.serviceHost = null; lt.Document.DocumentFactory.servicePath = null; lt.Document.DocumentFactory.serviceApiPath = null; lt.Document.DocumentFactory.localProxyUrlTemplate = null;
Include/configure the PDF client-side rendering dependencies
You’ll then need to point to the character map files and web-worker, both included with our SDK.
PDFJS.cMapPacked = true; PDFJS.cMapUrl = "Resources/Cmaps/"; PDFJS.workerSrc = "Scripts/Leadtools.Pdf.Worker.js";
Finally, add the compatibility helper which ensures different browsers behave identically. Again, this will go in your index.html file (after the above code).
Enable client-side rendering
This can be achieved by setting
usePDFText to true.
documentViewer.usePDFRendering = true; documentViewer.usePDFText = true;
Load a file
With the addition of this support, we’ve also added the loadFromFile option to our DocumentFactory. This method allows you to load in a native File object (acquired from a file input) for viewing.
To test this with the latest version of LEADTOOLS, download the free 60 day evaluation straight from our site. If you have any comments or questions regarding this, feel free to comment on this post or contact our Support department at email@example.com.