Email this Page
Log Support Call
Send Feedback
Print
|
|||||
Linking to An External File from HTMLHelpOften we are asked how to link to an external file (such as a PDF) from a CHM (HTML Help) file. You can create an external hyperlink to a .pdf file but when using HTML Help, this only works by using a fully qualified external URL, and having the link open a browser session containing the linked files - so the file would need to be held on a web server. I understand this is a limitation of HTML Help, and related to its internal compiled structure. You'll find using just the filename works fine in the plain HTML output. There is an alternative approach which involves using HTML code that creates a Shortcut, but it's important to note that this functionality is specific to HTML Help, so only works in HTML Help. If the Book is being published in both HTML Help and plain HTML, you need to use a fully qualified URL. An example of the code is as follows. It will vary slightly for each document so you need to create the HTML code for each document and insert this for each document you wish to open :
Where To use this code within Author-it:
If you use this approach, the file/s you are linking to must be in the same directory folder as the CHM file at runtime. You can add the PDF as an additional file to the file object used to add the HTML code. Under the HTML tab of the File Object, ensure that the source type is set to Linked Coded HTML File, and select the [>>] button next to the Additional Files - choose "Add" and navigate to and select the PDF file. Author-it will then copy this file to the Publishing folder for this Book each time you publish HTML or HTML Help. It's also important to note that when you open the CHM from the Author-it publishing window the link won't appear to work. It does work correctly when you open CHM file from Windows Explorer. |
|||||
| Top of Page |
Email this Page
Log Support Call
Send Feedback
Print
|
||||
|
|||||