Graphics not appearing in pdf output
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 12
- Joined: Fri Nov 01, 2013 8:53 pm
Graphics not appearing in pdf output
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.
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.
-
- Posts: 12
- Joined: Fri Nov 01, 2013 8:53 pm
Re: Graphics not appearing in pdf output
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.
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.
-
- Posts: 9448
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Graphics not appearing in pdf output
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:
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
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"
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 12
- Joined: Fri Nov 01, 2013 8:53 pm
Re: Graphics not appearing in pdf output
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
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
-
- Posts: 12
- Joined: Fri Nov 01, 2013 8:53 pm
Re: Graphics not appearing in pdf output
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.
Thank you for all your continued help here, in the Yahoo group and the google group. It's much appreciated!
Bryon T.
-
- Posts: 9448
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Graphics not appearing in pdf output
Hi Bryon,
Coming back to your original error message:
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:
The construct should have been something like:
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
The stylesheet would not do the same thing.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?
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"
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, '://')">
.....
Code: Select all
<xsl:when test="contains(@href, ':/')">
.....
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
<oXygen/> XML Editor
http://www.oxygenxml.com
Return to “DITA (Editing and Publishing DITA Content)”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service