Inserting file links

Navigation:  Basic Working Procedures > Links, Anchors, Macros, Scripts and HTML >

Inserting file links

Previous pageReturn to chapter overviewNext page

Show/Hide Hidden Text

A file link is a link to an executable file (e.g. notepad.exe) or to a data file associated with an application  (e.g. DOC word processing files or PDF files). Clicking on the link in the help is just like double-clicking on an executable or DOC or PDF file on your desktop or in Windows Explorer. It either starts the executable file or opens the DOC, PDF or other file with the associated application.

File links are not supported in all output formats! See the compatibility list below for details.

Click to expand/collapseHow to insert file links

If you plan to publish to Microsoft HTML Help (CHM), the files you link to must be stored in the same folder as the CHM help file. The Microsoft HTML Help viewer has a bug that makes it unable to access files outside the help file folder.

1.Select text in your document if you want to use it as the link. You can also skip this step and enter the caption in the hyperlink dialog.

2.Open the Insert Hyperlink dialog box. There are two ways to do this:

Press Ctrl+L

Select the Link tool in Write > Insert

3.Select the File Link tab:

DLG_Hyperlink_File

4.Enter the filename with extension in the File Name: field.

5.Enter any execution parameters associated with the file in the Execution Parameters: field, for example the file to be opened by the executable file or any necessary parameters for a data file.

6.Click on Test to test the link (the file must be present in your project directory for this to work).

See The Hyperlink dialog for full details on the settings in the dialog.

Click to expand/collapseFile links to page numbers and named destinations between PDF documents

Links between PDF files can open the PDF at a specific page number or special jump targets in the PDF document known as "named destinations". Help & Manual automatically creates named destinations in your PDF files for a large number of targets. See Named destinations in PDF for details on the named destinations created in PDFs by Help & Manual.

Note that named destinations are only relevant for links between two PDF files or from other applications or documents. Links within your Help & Manual projects will work correctly in your PDF output. You don't need to use named destinations for this.

HTML links to named destinations in PDFs:
Although named destinations in PDFs officially support links from HTML files this does not work reliably. Often, an HTML link to a named destination will just open the PDF at the first page. Linking to specific pages in PDFs does work from HTML files, however.
 
Application links to named destinations in PDFs:
Other applications have different syntax requirements for links to named destinations in PDFs. Please consult your application documentation and/or Adobe's PDF documentation for details.

 

Named destinations are supported with interactive PDFs only:

If the PDF you are linking to is created with Help & Manual it must be generated using the "interactive PDF" option in your PDF settings. Named destinations are only generated for interactive PDF documents.

Current restrictions on PDF-to-PDF links

The PDF engine used in Help & Manual currently has some restrictions on exporting links to page numbers and named destinations to PDF documents. At the moment you can only create links to page numbers, not to named destinations. Also, links to page numbers will jump two pages ahead of the specified number (see below).

These restrictions do not apply if you are adding links to a PDF in Acrobat or another PDF editing application. You can link to both named destinations and page numbers and the page number links will link to the correct number.

Links created in Help & Manual:

To link from a PDF created in Help & Manual you need to create a file link with the page number added to it. This number must the number you want to link to minus 2! For example, if you want to link to page 7, you must specify page 5.

1.Follow the instructions for inserting a file link and enter the name of the PDF file you want to link to.

2.Add a # character and the page number to the end of the file name minus 2, like this:

myfile.pdf#123 (jumps to page 121)
myfile.pdf#0 (jumps to page 2)
myfile.pdf#12 (jumps to page 10)

To link to page 1, just link to the PDF document without any page number.

Links created in Adobe Acrobat or another PDF tool:

If you are using Adobe Acrobat or another PDF editing tool you can add links to PDFs to jump to named destinations and page numbers in PDFs created by Help & Manual.  You can enter the exact page number you want to jump to. Then myfile.pdf#123 will really jump to page 123. For instructions, see the  documentation of your PDF editing tool.

At the moment you can't create PDF links to named destinations in another PDF in Help & Manual itself, the links won't work and will only jump to the first or second page of the PDF document. Sorry about that – this will be improved in a later release of Help & Manual.

However, if you are using Adobe Acrobat or another PDF editing tool you can add links to other PDFs to jump to named destinations and page numbers in PDFs created by Help & Manual. For instructions, see the documentation of your PDF editing tool.

Click to expand/collapseEmbedding linked files in PDF documents

You can automatically embed files referenced with file links into the PDF file when you export your project to PDF. This makes it possible to distribute additional files with your PDF document without having to use multiple files.

When the user clicks on the link the file will be displayed with the application with which it is associated in Windows. This works for most file types, including other PDF files, documents and images of all kinds and even executable EXE files.

1.In the Project Explorer go to Configuration > Publishing Options > Adobe PDF > PDF Layout and activate the option File links - embed linked files with the following extensions:.

2.Make sure that the files you want to link to are stored in one of the folders referenced in your Image Folders list in your project configuration settings. If you have many folder references place the files in one of the first few folders in the list.

3.Create your file links using the normal procedure.

When you publish your project the files referenced with file links will be physically embedded in the PDF file. You no longer need to distribute these files separately as they are now part of the PDF. This will increase the size of the PDF accordingly, of course.

Click to expand/collapseFile link compatibility in output formats

HTML Help:

Supported with execution parameters but do not use paths. All external files must be in the same directory as the HTML Help CHM file.

Also, note that links to some types of external files in HTML Help are now restricted in Windows. This is a security feature implemented by Microsoft so you should test all links on properly-configured XP systems before distributing.

Even more severe restrictions apply to HTML Help files accessed across network drives. Here file links will not work at all and HTML Help itself is also severely restricted. See weblink the EC Software website for more details. It may be possible to enable the display of CHM files on network drives but file links will not work in CHM files on network drives.

Note that the restrictions on CHM files on network drives have become more strict in Windows 7 and Vista, particularly the 64-bit versions. In these 64-bit versions of Windows, the activation options explained on our website will only work with CHM files opened by 64-bit applications. CHM files will not work when opened by 32-bit applications.

WebHelp:

Exported, but behavior depends entirely on the user's browser a file link in WebHelp is an URL to a file, with all that entails. Relative and absolute paths are supported; relative paths must be relative to the location of the help when it is accessed by the user. No execution parameters (for example, "wordpad.exe" on its own is OK but "wordpad.exe myfile.doc" will not work).

Windows Exe eBooks:

Supported, do not use paths, files must be in the same directory as the eBook. Simple file links only, no execution parameters.

ePub eBooks:

File links are not supported.

Visual Studio Help:

File links are explicitly forbidden in Visual Studio Help.

Adobe PDF:

Links to PDFs can include page number references and named destinations (see above). Links from PDFs can be simple file links only, no execution parameters. Links must be activated in Configuration > Publishing Options > Adobe PDF > PDF Layout to work in PDFs (also applies for named destinations).

Word RTF:

Supported but not recommended – users are very likely to move Word RTF documents around and the links will then be dead. No execution parameters.