问题
I want to use interactive svg image files in my documentation created with doxygen. Opening the html help files in a browser shows no error.
When I open the page in windows chm help file viewer I get an error:
An error has occurred in the script on this page.
Line: 9
Char: 1
Error: "init" is undefined.
Code: 0
URL: mk:@MSITStore some_long_address.svg
What can I do to use interactive svg image files?
回答1:
Please try adding the names of the *.svg files to the [FILES] list in your project (.hhp) file. This will ensure that the .svg files are compiled into the help file, which may not be the case at present.
If you're using HTML Help Workshop, the procedure for adding the file names to the [FILES] section is as follows:
- Open the .hhp file in HTML Help Workshop.
- Click the Add/Remove Topic Files button on the Project tab.
- Click Add.
- In the File Name field, type *.svg.
- Click Open, select the files to add to the list, and then click Open again.
Having some experience with help authoring and CHM files you can go the short way by editing your *.hhp file with a text editor. Add a new wildcard line for all SVG files in the [FILES] section like:
[FILES]
svg\*.svg
design.css
...
You should check the HTML code too. You'll need HTML Code like:
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=9">
<title>SVG - Example 2</title>
</head>
<body>
<embed src="../svg/svg-sample-Circle.svg" type="image/svg+xml">
</body>
</html>
You may want to test compiling a CHM file including SVG's for your needs. So I uploaded some files and a CHM project file Download CHM SVG sample files.
Please note, to open the files right-click the saved *.zip or *.chm file, click Properties, and then click Unblock.
来源:https://stackoverflow.com/questions/22664600/can-i-have-interactive-svg-image-files-created-with-doxygen-in-chm-files