Opening PDFs in HTML Help

A PDF file can be opened from an HTML Help topic using an ActiveX Control called a Shortcut. A Shortcut is designed to launch applications and also launch files associated with the application.  For example, you can launch Microsoft Word by specifying WINWORD.EXE, or you can open a file named RESUME.DOC, since DOC extensions are associated with Microsoft Word. As long as the program's extension is registered with Windows, you should be able to open the file. For more information, Shortcuts were covered in the April 2000 RoboHelp Tip and they work in both WinHelp and HTML Help.

PDFs are extensions of Acrobat Reader.  When a PDF opens, it launches into a separate Acrobat Reader window; it is not possible to open a PDF "inside" the HTML Help viewer, however. To create a new shortcut in your HTML Help project, try the following:

  1. Open Windows Explorer and copy the PDF file you want to open from the HTML Help file to the project's root folder.

  2. Open your RoboHelp HTML project.

  3. Position the cursor where you want to launch the PDF file.

  4. Choose Insert: HTML Help: Shortcut.

  5. Type a description of the button and click Next.

  6. Click the browse folder icon.  The Shortcut dialog only lets you view EXE files, but if you type an asterisk (*) in the File name field and click Open, you should be able to browse all file extensions.

  7. Browse to the location of the PDF you wish to open from your Help file and click Open.

  8. Select a topic in the event the user does not have Acrobat Reader.

  9. Compile and Run Help.
    If the user has Acrobat the Help file launches the file in Acrobat.  If the user cannot display the file, a message informs them of the problem followed by your "friendly" message.

Note:
The PDF must be distributed with the Help file and stored in the same folder as the CHM file.

Next, Opening PDFs from WebHelp