DITA PDF2 transformation - image not found error
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 6
- Joined: Mon Nov 24, 2008 7:05 pm
DITA PDF2 transformation - image not found error
I have a simple project for which I'm using the PDF2 transformation in oXygen Author 10 to generate the PDF output. The generation completes successfully, but every image in the document produces an error of the following form:
[fop] 594 ERROR [ main ] org.apache.fop.fo.FONode - Image not found: p2p_exchange\image\data_correct.png
The structure of my project is:
p2p_exchange.ditamap
p2p_exchange/task1.xml
...
p2p_exchange/task4.xml
p2p_exchange/image/image1.png
...
p2p_exchange/image/image20.png
The image hrefs are all relative to the pages they're contained in: in the task1..4.xml files, the href attribute of the image tag is image/image1.png.
When I generate XHTML or the HTML Help documentation or even the regular PDF output, the images show up correctly (and they show up correctly also in Author). Is there some setting I'm missing for PDF2 for it to find the images?
Thanks
Andrew
[fop] 594 ERROR [ main ] org.apache.fop.fo.FONode - Image not found: p2p_exchange\image\data_correct.png
The structure of my project is:
p2p_exchange.ditamap
p2p_exchange/task1.xml
...
p2p_exchange/task4.xml
p2p_exchange/image/image1.png
...
p2p_exchange/image/image20.png
The image hrefs are all relative to the pages they're contained in: in the task1..4.xml files, the href attribute of the image tag is image/image1.png.
When I generate XHTML or the HTML Help documentation or even the regular PDF output, the images show up correctly (and they show up correctly also in Author). Is there some setting I'm missing for PDF2 for it to find the images?
Thanks
Andrew
-
- Posts: 9438
- Joined: Fri Jul 09, 2004 5:18 pm
Re: DITA PDF2 transformation - image not found error
Dear Andrew,
Thank you for contacting us.
Indeed I created a project with the structure identical to yours and the same problem also happened to me.
The strange part is that (in my case at least) the PNG image seems to be copied correctly to the output folder to something like out/p2p_exchange/image/image1.png. Is it present in the output folder in your case?
If in OXYGEN_INSTALL_DIR/frameworks/dita/DITA-OT/demo/fo/build.xml file you comment from line 231 to line 234 so that the generated FO file is not deleted after the transformation, open that file in Oxygen and use the read-only "FO PDF" scenario the scenario will generate the PDF with all the PNG images embedded.
I will keep looking into this, possibly contact the DITA Open Toolkit users list and try to come out with a patch.
Regards,
Radu
Thank you for contacting us.
Indeed I created a project with the structure identical to yours and the same problem also happened to me.
The strange part is that (in my case at least) the PNG image seems to be copied correctly to the output folder to something like out/p2p_exchange/image/image1.png. Is it present in the output folder in your case?
If in OXYGEN_INSTALL_DIR/frameworks/dita/DITA-OT/demo/fo/build.xml file you comment from line 231 to line 234 so that the generated FO file is not deleted after the transformation, open that file in Oxygen and use the read-only "FO PDF" scenario the scenario will generate the PDF with all the PNG images embedded.
I will keep looking into this, possibly contact the DITA Open Toolkit users list and try to come out with a patch.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 9438
- Joined: Fri Jul 09, 2004 5:18 pm
Re: DITA PDF2 transformation - image not found error
Hi Andrew,
I made a patch in OXYGEN_INSTALL_DIR/frameworks/dita/DITA-OT/demo/fo/build.xml
Just open the file and replace lines 269 to 271 with:
The problem was that the built-in FO processor needed to have a correct base directory to solve the relative images to.
Regards,
Radu
I made a patch in OXYGEN_INSTALL_DIR/frameworks/dita/DITA-OT/demo/fo/build.xml
Just open the file and replace lines 269 to 271 with:
Code: Select all
<dirname file="${outputFile}" property="outputDir"/>
<fop format="application/pdf" fofile="${inputFile}"
outfile="${outputFile}" messagelevel="info" force="true" userConfig="${dita.dir}/fop_relax_validation.xml" basedir="${outputDir}">
</fop>
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ 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