Graphics not appearing in pdf output

Post here questions and problems related to editing and publishing DITA content.
bthomas22
Posts: 12
Joined: Fri Nov 01, 2013 8:53 pm

Graphics not appearing in pdf output

Post by bthomas22 »

My graphics paths are relative to the topics they are in.
I get the following errors when printing topics from a bookmap.

[exec] AHFCmd :WARNING: Graphic file is not found: "file:///C:/Workspaces/KACPubs/bookmaps/file:/C:/out/common/graphics/9jh02474.eps"

The relative path in the topic is : <image href="../graphics/9jh02474.eps"> I'm using eps with ghostscript and antenna house. It prints fine in other uses. The same error appears for other image types such as png and jpg.

Images print when printing topics individually.
bthomas22
Posts: 12
Joined: Fri Nov 01, 2013 8:53 pm

Re: Graphics not appearing in pdf output

Post by bthomas22 »

Can't quite grasp the why, but Oxygen didn't like my bookmap being in a separate folder at the top of a folder structure. For instance:
Folder Structure:
common
productA
productB
bookmaps

It wanted:
common
productA
productB
bookmap1.ditamap

When in the first structure, it could read the documents, but not the art.
Radu
Posts: 9448
Joined: Fri Jul 09, 2004 5:18 pm

Re: Graphics not appearing in pdf output

Post by Radu »

Hi,

Oxygen uses the DITA Open Toolkit engine to generate output from DITA content.
The DITA Open Toolkit has always had problems when the DITA Map refers to resources which are outside of the folder where the map is located. We have this documented here:

http://www.oxygenxml.com/doc/ug-oxygen/ ... -refs.html

So you found the proper solution to move the map outside of that inner folder.

Regarding your specific problem:

Code: Select all

[exec] AHFCmd :WARNING: Graphic file is not found: "file:///C:/Workspaces/KACPubs/bookmaps/file:/C:/out/common/graphics/9jh02474.eps"
I could try to come up with a fix in the XSLT stylesheets for it if you want to continue keeping the DITA Maps in a separate folder. What version of Oxygen are you using?

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
bthomas22
Posts: 12
Joined: Fri Nov 01, 2013 8:53 pm

Re: Graphics not appearing in pdf output

Post by bthomas22 »

I'm using Oxygen 15.0 build 2013062614.

I'd appreciate that.

It's not a huge issue with bookmaps, but it gets a little troublesome when I use nested ditamaps in a bookmap, and have to have different locations for submaps. This won't be as much trouble I believe in a CCMS, but in our pilot, we are limited to a folder structure.

Visual of issue:
<bookmap >
<ditamap A>
<ditamap B/>
</ditamap>
</bookmap>

The bookmap must be above the ditamap, ditamap A above B.

Bryon
bthomas22
Posts: 12
Joined: Fri Nov 01, 2013 8:53 pm

Re: Graphics not appearing in pdf output

Post by bthomas22 »

Oxygen was happy with setting fix.external.refs.com.oxygenxml to true. How would you set this up in the stylesheet to do the same thing? It would be useful to know when setting up the scenario outside of the Oxygen's parameters.
Thank you for all your continued help here, in the Yahoo group and the google group. It's much appreciated!
Bryon T.
Radu
Posts: 9448
Joined: Fri Jul 09, 2004 5:18 pm

Re: Graphics not appearing in pdf output

Post by Radu »

Hi Bryon,
Oxygen was happy with setting fix.external.refs.com.oxygenxml to true. How would you set this up in the stylesheet to do the same thing?
The stylesheet would not do the same thing.
Coming back to your original error message:

Code: Select all

[exec] AHFCmd :WARNING: Graphic file is not found: "file:///C:/Workspaces/KACPubs/bookmaps/file:/C:/out/common/graphics/9jh02474.eps"
The error message reminded me of a bug I added to the DITA OT bugs list some time ago:

https://github.com/dita-ot/dita-ot/issues/1468

I also patched the issue on our side in the bundled DITA OT but the patch did not work in all cases. If you open the XSL:

OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT\plugins\org.dita.pdf2\xsl\fo\commons.xsl

it contains at some place a construct like:

Code: Select all

<xsl:when test="contains(@href, '://')">
.....
The construct should have been something like:

Code: Select all

<xsl:when test="contains(@href, ':/')">
.....
in order to avoid pre-pending the location where the XML is located to the image reference if the image reference was absolute.
Probably in your DITA content the image reference is not absolute but I think that one of the DITA OT preprocessing stages might make it absolute. I actually added a comment to the end of the issue based on your situation.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply