Description of problem: if you have .xml files in a subdirectory of en-US and images in a subdirectory of en-US/images publican creates an incorrect path for the included image in the PDF. It works fine with the html output This is needed to try to maintain some source compatibility with some JBoss project docs Version-Release number of selected component (if applicable): 0.44 How reproducible: everytime Steps to Reproduce: 1. Paths: my_book/en-US/Chapter1/Section-A.xml my_book/images/Chapter/figure.png 2. within my_book/en-US/Chapter1/Section-A.xml <section> <title>A</title> <figure> <title>some figure</title> <mediaobject> <imageobject> <imagedata fileref="images/Chapter1/figure.png" /> </imageobject> </mediaobject> </figure> </section> 3. make clean pdf-en-US Actual results: No image in PDF and this error message: Mar 24, 2009 12:07:35 PM org.apache.fop.fo.flow.ExternalGraphic bind SEVERE: Image not found: Chapter-1/Chapter-1/images/Chapter-1/figure.png Mar 24, 2009 12:07:35 PM org.apache.fop.render.pdf.PDFRenderer putImage SEVERE: Image not found: Chapter-1/Chapter-1/images/Chapter-1/figure.png Expected results: Image in PDF Additional info: This can be worked around in the PDF by supplying the path as: ../../images/Chapter1/figure.png , but this breaks the html
Could you test this for me on a some books? test1: with flat xml and flat images test2: with flat xml and nested images test3: with nested xml and flat images test4: with nested xml and nested images proposed change: edit: /usr/share/publican/pdf.xsl on line 58 change: keep.relative.image.uris from select="0" to select="1" FYI: Zero is the default in the DocBook xslt for FO output.
keep.relative.image.uris select="1" works tested with pdf, html and html-single only in English, don't know if there would be any translation issues
YAY. That was driving me nuts! Minor typo in the path /usr/share/publican/xsl/pdf.xsl
Hi Darrin, is this still a problem with the latest release?
Still broken in publican-0.45-0.el5 eg. SEVERE: Image not found: PC_Setup/images/Vpn/WiFi-WEP.png
ah, yeah still broken. I'd modifed my pdf.xsl as per above & had to reinstall to check.
This should be fixed in the BETA.
The version of pdf.xsl installed by the BETA still contains select="0" and therefore does not include images when both the XML and the images are in subdirectories, as originally reported. Changing to select="1" allows the BETA find the images and include them correctly.
Check in this fix, so it will be in 1.0: $ svn diff -r779:780 datadir/xsl/pdf.xsl Index: datadir/xsl/pdf.xsl =================================================================== --- datadir/xsl/pdf.xsl (revision 779) +++ datadir/xsl/pdf.xsl (revision 780) @@ -58,7 +58,7 @@ <xsl:param name="fop1.extensions" select="1"/> <xsl:param name="img.src.path"/> <xsl:param name="qandadiv.autolabel" select="1"/> -<xsl:param name="keep.relative.image.uris" select="0"/> +<xsl:param name="keep.relative.image.uris" select="1"/> <xsl:param name="email.delimiters.enabled">0</xsl:param> <xsl:param name="hyphenation-character">
Fixed in 1.0 With that modification to pdf.xsl, Publican finds and uses the image correctly.
publican-1.2-0.fc12 has been submitted as an update for Fedora 12. http://admin.fedoraproject.org/updates/publican-1.2-0.fc12
publican-1.2-0.fc12 has been pushed to the Fedora 12 stable repository. If problems still persist, please make note of it in this bug report.
publican-1.2-0.fc11 has been pushed to the Fedora 11 stable repository. If problems still persist, please make note of it in this bug report.