问题
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:
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
来源:https://stackoverflow.com/questions/14335525/including-a-pdf-file-in-shfb-generated-chm-html-helpfile-1