Opening DOC and PDF files from TOC?

Please post all questions relating to Help & Manual 6 here!

Moderators: Alexander Halser, Tim Green

Post Reply
Timon Fisher
Posts: 2
Joined: Thu Apr 09, 2015 3:06 pm

Opening DOC and PDF files from TOC?

Unread post by Timon Fisher »

Hello,

Is it possible to include word or PDF files in the published output having them each individually referenced in the TOC, which when clicked open the required document directly. I can see the function of inserting a file link in a topic to such files if they were baggage but not if is possible for a TOC entry to link directly. I believe this is possible with other tools but not sure if it H+M doesn't or if I just can't figure it out.

Similary I would like to be able to publish Webhelp output with those various word/pdf documents included into the same output target folder, to faciliate easy packaging to a CD/USB key so that end users can then quickly move the whole data set onto their "non internet connected" server.

Many thanks
Timon
User avatar
Tim Green
Site Admin
Posts: 23181
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Opening DOC and PDF files from TOC?

Unread post by Tim Green »

Hi Timon,

Generally, I would recommend *not* including files directly from the TOC. It only really makes sense in CHM, and even there it makes more sense to link to the CHM instead of displaying it in the restricted confines of the antiquated CHM viewer. In WebHelp it is possible but it will stop working if you want responsive WebHelp in the future that also works on tablets and phones. To make this possible we are eliminating iFrames, and as a result it will no longer be possible to open another web page or a document inside the topics frame because there will be no topics frame -- the topic page is then the main page, and any other document or page you open in it would replace it completely.
Is it possible to include word or PDF files in the published output having them each individually referenced in the TOC, which when clicked open the required document directly.
For this to work reliably in CHM you need to make sure that the PDF has no spaces or special characters in its name and embed the PDF in the CHM file. Alternatively you can also register your CHM in the Windows Registry as part of your install, then the TOC link will work as long as the PDF is in the same folder as the CHM.

To do it with embedding you add the PDF to the baggage files of your project, then create a new TOC entry with the "Web Link" option and enter the target with this syntax:

ms-its:YourFile.chm::/YourFile.pdf

Where "YourFile.chm" is the CHM file and "YourFile.pdf" is the PDF file embedded in the CHM.
Similary I would like to be able to publish Webhelp output with those various word/pdf documents included into the same output target folder,
This is automatic if you add the files to the Baggage. Otherwise you need to copy the files to the output folder automatically. If you have a lot of files in the baggage it's best to work in the uncompressed HMXP format. Then they are stored as separate files in your project folder. In compressed HMXZ projects everything is stored inside the single project file.
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Timon Fisher
Posts: 2
Joined: Thu Apr 09, 2015 3:06 pm

Re: Opening DOC and PDF files from TOC?

Unread post by Timon Fisher »

Thanks Tim,

That's very helpful. In the short term I would like to try having them listed out in the WebHelp TOC as well (noting that will not work in the future. I have users who won't use the documents unless they are right in front them.) I presume that for that I need to follow a different process from the CHM embedding described above though?
User avatar
Tim Green
Site Admin
Posts: 23181
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Opening DOC and PDF files from TOC?

Unread post by Tim Green »

Timon Fisher wrote:Thanks Tim,

That's very helpful. In the short term I would like to try having them listed out in the WebHelp TOC as well (noting that will not work in the future. I have users who won't use the documents unless they are right in front them.) I presume that for that I need to follow a different process from the CHM embedding described above though?
For WebHelp it's quite simple. You just create a new TOC entry with the WebLink option and enter the name of the PDF file (no spaces, no non-alphanumeric or accented characters) as the Target address. Just the file name on its own -- or a relative path if it's not stored in the same folder as the main WebHelp files.

Then after creating the entry check the screen on the right and change the Target Window setting to "Topics Frame" to display the PDF in the topics frame. You can add the PDF file to the baggage to export it automatically if you want. That's pretty much it then.. 8)
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Post Reply