Robert Woods
Robert Woods

Reputation: 379

Pictures not showing in CHM help file

I am updating the help documentation for our software, but when I compile on my machine using HTML Help Workshop, none of the pictures show. The pictures show just fine in Visual Studio, but when I compile the help file it shows as either an "Image Missing" icon (a Polaroid photo with a cross in it) or just the file name.

Here is an example page showing my problem

If anyone could point me in the right direction that'd be much appreciated.

Upvotes: 0

Views: 2173

Answers (2)

Robert Woods
Robert Woods

Reputation: 379

I managed to fix my problem, thank you very much for your help.

In the folder that holds the images for each page, for example index_files, I noticed there was a file named "filelist.xml".

The contents of this file look something like this:

<xml xmlns:o="urn:schemas-microsoft-com:office:office">
<o:MainFile HRef="../index.htm"/>
<o:File HRef="themedata.thmx"/>
<o:File HRef="colorschememapping.xml"/>
<o:File HRef="image001.png"/>
</xml>

By adding extra references for image002, 003 and so on, it fixed the whole CHM.

Upvotes: 0

help-info.de
help-info.de

Reputation: 7298

Please try following for things I see right away that might be the problem ..

  1. Check the HTML code and make sure that the graphics referenced in the tags have the correct file names and are in the correct location.
  2. Add the path names of your graphic files to the [FILES] list in your project (.hhp) file. This will ensure that they are compiled into your help file.

Note to have your "images" directory below (!) your HTMLHelp Workshop project file *.hhp level. Make sure working on your local drive! You can open the .hhp file in Notepad and then add the names of e.g. the script files (or just *.js) or *.jpg to the FILES section. For example:

[FILES] 
*.css 
*.js 
images\foobar-1.jpg 
images\foobar-2.jpg 
html\*.htm 
images\*.jpg

Besides the files listed in the [FILES] section of the .hhp file, the compiler pulls into the .chm file those local files that are directly referenced in the HTML source and in the contents (.hhc) and index (.hhk) files. So, for example, most graphics are directly referenced in the HTML topic files through elements and don't need to be listed in the [FILES] section. On the other hand, a graphic that is referenced only in the style sheet (.css) file linked to those topic files would need to be added to the [FILES] list, as otherwise the compiler would be unaware of it.

Alternatively, please try this:

  1. Open the project (.hhp) file in HTML Help Workshop.
  2. Click the Add/Remove Topic Files button in the left-hand Project tab.
  3. Click Add.
  4. In the File Name field, type *.js.
  5. Click Open, and then select the files to use.

HTH

Upvotes: 2

Related Questions