Graphics not being displayed

Topics: User Forum
Apr 12, 2008 at 9:54 PM
I added a .htm file as AdditionalContent that contains two lines of text followed by a graphics image (.gif) file. The project builds successfully but when I go to display the .chm output I don't see the graphics. The text is there but the graphics image shows up as the familiar small box with the red X in the middle. What else do I need to do or is this a bug? Thanks for any help.

BruceB
Coordinator
Apr 12, 2008 at 11:21 PM
You didn't mention it but I'll assume you added the image as additional content too. Make sure that the path to the image in the HTML file is correct. How you specify it will depend on where the HTML file and the image file are in relation to each other. You can build a website version of the help file to play around with the paths if you aren't sure.

Eric
Apr 13, 2008 at 12:33 AM
Hello Eric,

I started from a Word document that had the two lines of text that I originally mentioned followed by an image that I created from Visio. I then did a SaveAs html in Word to get the .htm file that I solely provided to SandCastle as AdditionalContent. The reason I called the missing image a .gif is because in the process of doing the SaveAs html, Word created a new subdirectory with the same name as the .htm file that contains an .xml, .gif, .emz and .mso files. It is the .gif file that when displayed looks just like the original Visio image.

When I examine the source code for the .htm file, it contains references to the .gif file only. I expected that the .chm file produced by SandCastle would contain everything that it needed with correct linkages. Apparently something is broken because the text in the .htm came through but not the graphics image. Any ideas?

Thank you,
Bruce




EWoodruff wrote:
You didn't mention it but I'll assume you added the image as additional content too. Make sure that the path to the image in the HTML file is correct. How you specify it will depend on where the HTML file and the image file are in relation to each other. You can build a website version of the help file to play around with the paths if you aren't sure.

Eric


Coordinator
Apr 13, 2008 at 1:20 AM
Be sure that you are including everything in the additional content (i.e. copy the folder, not just the HTML file). When copying the folder, you need to set the DestinationPath property on the folder item so that it creates a matching folder in the help file content. Like I said, build a website version of the project and see what you get. You can then play around with the HTML files. If the above doesn't fix it, it could be that you just need to adjust the relative path to the image file.

Eric