I need to include a pdf file in my sandcastle documentation. The user should be able to navigate to the pdf on clicking it in the .chm file. Is it possible to do this? I've been searching all forums with no proper answer. I have tried using href tag in the xml comment and providing the url of the pdf file. But it opens the browser instead of the pdf file. Has anyone done this before?
1 Answers
I have a download link for you:
http://www.help-info.de/files_download/CHM-example_project.zip
This is from my "HTMLhelp - Download" section (see link below) and you'll find a complete HH Workshop project and of course the resulting CHM file.
www.help-info.de/en/Help_Info_HTMLHelp/hh.htm
(1) So, please download and save to your local drive.
(2) Please unzip and you'll find a CHM-example.chm file.
(3) To open this file right-click the file, click Properties, and then click Unblock and OK
(4) Double-click to the file and resize the help window for your needs
(5) Open node "HTMLHelp Examples"
(6) Search for "Link to PDF .." in the TOC and open this topic
(7) Please note that the topics themselves include specific information.
So, go deeper into the code for your needs. Of course you must compile the CHM again after editing.
Hope that's it ;-)
Note there are tricky links from the TOC to "Volkswagen". You may need to go deeper into code here.
Ulrich Kulle - Microsoft Help MVP - (2007-2009) - http://www.help-info.de

- 6,695
- 16
- 39
- 41
-
Thanks Ulrich. I am using C# VS 2010. The problem is, the XML comments are not reading the HTML tags. I tried the Link to PDF in your hHTML help. But, SHFB doesnt seem to read html tags. Any idea as to how to go about it? – Pramod Shandilya Jan 16 '13 at 03:59
-
As you can see at the PDF link examples in the Table of Contents (TOC)of my CHM file there are three different ways. I think it's hard to do. I didn't use MAML and SHFB for years but have it on my machine again. Do you want to link to PDF on a server (from TOC)? Do you want to link to PDF embedded / not embedded into the CHM? – help-info.de Jan 16 '13 at 20:53