Page 1 of 1

images not displayed in webhelp output file.

Posted: Fri Jan 21, 2011 11:23 am
by nadigersriharsha
Hello,
I am generating\apply transformation webhelp in oxygen xml tool. I have created a ditamap and also add all the associated dita topics to it. Images\screenshots do not appear in the output file. I get a red cross mark in the place of the screenshot\image. Please help me with this. In the text mode the
<image
href="../../../../assets/CWlogin.PNG" placement="break"
id="image_4b6678c0-f931-4243-90e2-f60b145667fe"/>

appears. The link or folder struture is correct in href.

Re: images not displayed in webhelp output file.

Posted: Fri Jan 21, 2011 12:47 pm
by Radu
Hi,

Usually the DITA Open Toolkit (used by Oxygen to publish DITA content to various output formats) has problems when in your DITA content you reference resources (like images for example) in a directory path outside the path of the DITA Project (where the main DITA Map is located).
So it would be best if your images folder would be located on the same level with the DITA Map for example.
Usually the DITA Open Toolkit complains about such problems in the Oxygen console view to you can also look in the console to see if this is the case.

Regards,
Radu

Re: images not displayed in webhelp output file.

Posted: Fri Nov 13, 2015 8:22 pm
by kanchana
Hi,

What was the resolution for this issue? We have a similar issue - images are not displaying in webhelp & xhtml output. When we generate webhelp or xhtml, the image folder is not in the same folder as the output html files; instead it is copied over to a different folder. So, our out directory looks like the following:

BookNameDir
  • *.dita files
    out
    • webhelp
      • oxygen-webhelp
        *.html files
      BookNameDir
      • images
        • *.png files
We are able to manually move the images folder to the HTML file folder - but this is not an ideal solution. Our book dita, ditamap, and image files have the following folder heirarchy/structure:

MultibookDitamapFile
Book1Folder
  • BookLevelDitamapFile
    Chapter1DitaFile
    Chapter2DitaFile
    ...
    ImagesFolder
    • Image1pngFile
      Image2pngFile
      ...
Book2Folder
...

When we tried to troubleshoot, we noticed the following:

* If we generate content for multiple books (using the multibook ditamap file), the images display correctly. We are noticing this issue only when we generate content for individual books, which we want to do.
* The generated output for a book with no cross-references to other books displays correctly - the images display in the pages in this book. So, this appears to be an issue only in books with cross-references to other books.

Can you please help?

Thanks,
Kanchana

Re: images not displayed in webhelp output file.

Posted: Tue Nov 17, 2015 6:05 pm
by bogdan_cercelaru
Hello,

You could use a custom build file that copies the image folder in the output folder at the end of the transformation process.
The custom build file should be saved in the DITA_OT_DIR and look like this:

Code: Select all

<project basedir="." default="dist">
<!--The DITA OT default build file-->
<import file="build.xml"/>
<target name="dist">
<!--Call the DITA OT default target-->
<antcall target="init"/>

<!-- You could run your script here -->
<copy todir="${output.dir}\image_folder">
<fileset dir="path_to_image_folder"/>
</copy>
</target>
</project>
It's based on the example seen here:
Transforming DITA Content / Customizing DITA Transformations / Using a Custom Build File

Regards,
Bogdan

Re: images not displayed in webhelp output file.

Posted: Wed Nov 18, 2015 12:06 am
by Radu
Hi,

If the images are referenced directly from your topics they should be copied automatically to the output folder.
There are certain cases when this does not happen, you should check if this matches your case:

https://www.oxygenxml.com/doc/versions/ ... -refs.html

Regards,
Radu