| Application Settings - PDF Viewer |
Applies to HTML Viewer, IE Browser publications. HTML Executable lets you integrate a stand-alone PDF viewer in your publications and ebooks. Your end users can view and read PDF documents compiled in your publication without the need of Adobe Reader or any other PDF reader. Using the built-in PDF viewer lets you keep your PDF documents as secure as possible: they are not unpacked to the hard disk, so they cannot be copied by your users. Displaying PDF documents in your ebook or publication
In cases you are unable to display PDF documents correctly, add the "_heopenit" target to the anchor tag as shown in the following HTML code: <a href="mydoc.pdf" target="_heopenit">Open my PDF document</a> This will force the publication to open the "mydoc.pdf" file in the default PDF reader. About the Built-in PDF ViewerThe built-in PDF engine handles almost all PDF documents fine: PDF files created by popular printer drivers, Adobe Acrobat, Microsoft Office or OpenOffice should be displayed and printed fine. However, PDF files created by imaging and advanced publishing tools may not be properly displayed. If this is the case, printing your PDF document using a printer driver such as PDF Creator may help.
Features available with the Built-in PDF Viewer
Note: you can disable the "page rotation" feature in the Application Settings => PDF Viewer page. Page rotation is not compatible with text selection. It is possible to enable the display of the navigation bookmark panel at startup: when the PDF is loaded, its bookmarks are automatically listed. You can disable this feature at any time thanks to the HEShowPDFBookmarks global variable.
Loading external PDF files with HEScriptYou can load external PDF files directly in the publication thanks to the HEScript command named "LoadPDFFromFile". Example: procedure OpenPDFDialog;
var
Path: String;
begin
Path := OpenFileDialog("Choose the PDF to open", "*.pdf", "*.pdf", "PDF Files (*.pdf)", "");
if Path = "" then exit;
LoadPDFFromFile(Path);
end; Sending commands to the PDF viewer engineWhen the PDF viewer engine loads a PDF document, it triggers the OnPDFDisplay event. You can then pass commands thanks to the built-in HEScript functions named PDFViewerCommand and PDFViewerCommandStr. List of available commands (and description / parameter value for PDFViewerCommand)
The following script example lets you switch to the AGG renderer (insert it in UserMain) procedure OnPDFDisplay(PDFPath: String); begin PDFViewerCommand(141, 0); end; |
This is the online documentation of HTML Executable.
About HTML Executable
HTML Executable is a versatile HTML compiler and ebook compiler: it lets you create secure ebooks and desktop applications with your websites, HTML or PDF documents.
You can easily create attractive ebooks, full-featured HTML applications (RIA) and software, digital publications from your websites, PDF files and HTML documents for online or offline distribution.