PDF Output without images

Post here questions and problems related to editing and publishing DITA content.
lostiniceland
Posts: 14
Joined: Tue Nov 12, 2013 4:26 pm

PDF Output without images

Post by lostiniceland »

Hello everyone

it seems I am getting into every pitfall about Dita during my evaluation :-)

Today I tried separating me content into different projects (I am using the Oxygen Eclipse-Plugin), because the content got cluttered to much in just one project. My idea is to have general concepts, tasks and references in one main project which will be the main one. Then I created two separate projects which contain d4p content because I need to create some basic documents (with a classic Word structure). The idea is to provide chapter in those projects but reference content from the main projects for reuse. This works quite well, with one exception: in pdf-output a reference image from the main project is not displayed at all.

This is my structure
de.content
-userguide.ditamap
concept
---myConcept.dita // references image using keyref or href
image
---myImage.png
de.content.d4p-document1
-myDocument.ditamap // d4p map referencing myConcept.dita
Every resource has a keydefinition and I made sure that I apply a prefix for each project so that each key is unique.

I have set the transformation-property generate.copy.outer=3 and I am not getting any error or warning during the transformation. I also tried referencing the image using href instead of keyref but the result is the same.

During my research I came across this post on the dita-usergroup which links to this bugreport. So I inspected the content of the file mentioned but it seems the fix is already included in the latest Oxygen release (or Dita OT).

I generated an XHTML-output, which is capable of handling d4p, and there I can see the image.

Is there anything I did wrong or is there something I can change in the processor to make that work?
Thanks
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: PDF Output without images

Post by sorin_ristache »

Hi,

Is the image that is missing from the PDF output located in a directory located outside the directory containing the input DITA map? If yes I recommend setting the parameter fix.external.refs.com.oxygenxml to true in the DITA PDF transformation. Only this parameter translates correctly the relative paths like ../../some_dir/some_iamge.png that point to a DITA overflowing resource, which is a file located outside the directory containing the input DITA map.


Regards,
Sorin
lostiniceland
Posts: 14
Joined: Tue Nov 12, 2013 4:26 pm

Re: PDF Output without images

Post by lostiniceland »

Hi again Sorin :)

I expected that there is a problem with the path and your solution sounds promising.

Unfortunately I am getting an JVM-Runtime-Exception

Code: Select all

Buildfile: C:\Users\Marc\Programmieren\Eclipse\plugins\com.oxygenxml.editor_15.1.0.v2013101713\frameworks\dita\DITA-OT\build.xml

BUILD FAILED
org.apache.xerces.parsers.ObjectFactory$ConfigurationError: Provider ro.sync.xml.transformer.dita.remote.RelaxDefaultsDITARemoteMapsParserConfiguration not found
at org.apache.xerces.parsers.ObjectFactory.newInstance(Unknown Source)
at org.apache.xerces.parsers.ObjectFactory.createObject(Unknown Source)
at org.apache.xerces.parsers.ObjectFactory.createObject(Unknown Source)
at org.apache.xerces.parsers.SAXParser.<init>(Unknown Source)
at org.apache.xerces.parsers.SAXParser.<init>(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.<init>(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl.<init>(Unknown Source)
at org.apache.xerces.jaxp.SAXParserFactoryImpl.newSAXParser(Unknown Source)
at org.apache.tools.ant.util.JAXPUtils.newSAXParser(JAXPUtils.java:215)
at org.apache.tools.ant.util.JAXPUtils.getNamespaceXMLReader(JAXPUtils.java:172)
at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:273)
at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:178)
at org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:82)
at org.apache.tools.ant.Main.runBuild(Main.java:793)
at org.apache.tools.ant.Main.startAnt(Main.java:217)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)

Total time: 0 seconds
org.apache.xerces.parsers.ObjectFactory$ConfigurationError: Provider ro.sync.xml.transformer.dita.remote.RelaxDefaultsDITARemoteMapsParserConfiguration not found
at org.apache.xerces.parsers.ObjectFactory.newInstance(Unknown Source)
at org.apache.xerces.parsers.ObjectFactory.createObject(Unknown Source)
at org.apache.xerces.parsers.ObjectFactory.createObject(Unknown Source)
at org.apache.xerces.parsers.SAXParser.<init>(Unknown Source)
at org.apache.xerces.parsers.SAXParser.<init>(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.<init>(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl.<init>(Unknown Source)
at org.apache.xerces.jaxp.SAXParserFactoryImpl.newSAXParser(Unknown Source)
at org.apache.tools.ant.util.JAXPUtils.newSAXParser(JAXPUtils.java:215)
at org.apache.tools.ant.util.JAXPUtils.getNamespaceXMLReader(JAXPUtils.java:172)
at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:273)
at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:178)
at org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:82)
at org.apache.tools.ant.Main.runBuild(Main.java:793)
at org.apache.tools.ant.Main.startAnt(Main.java:217)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Provider ro.sync.xml.transformer.dita.remote.RelaxDefaultsDITARemoteMapsParserConfiguration not found
I have also set generate.copy.outer=3 which is recommended for external paths as well. I played around with default (1) and 2, but I get the same error. No other parameters are set.
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: PDF Output without images

Post by sorin_ristache »

Hi,

Thank you for the details that you provided by email. I understand that the image files are not located outside the directory with the input DITA map. In this case you need not set the parameters generate.copy.outer and fix.external.refs.com.oxygenxml, because they are useful only in case the files are located outside the DITA map directory.

Please check if there is any error message containing the file name of an image that is missing from the output of the DITA transformation. You should check that in the view that displays all the logging output messages issued by the DITA transformation (debug, info, warning error), displayed at the bottom of the application window. By default this view is disabled (because the list of DITA output messages is very long and not particularly interesting for a lot of users), so you have to enable it first before starting the DITA transformation, by selecting Show console output - Always on the Output tab of the DITA transformation dialog box.

If this view provides no useful hints we will need a set of sample files for reproducing the problem.


Regards,
Sorin
lostiniceland
Posts: 14
Joined: Tue Nov 12, 2013 4:26 pm

Re: PDF Output without images

Post by lostiniceland »

The image is outside the the map-rootfolder.

I restructured my multiple-projects-layout into a single-project were all maps reside in the root and all content is nested. Now the output contains the images.

I will reproduce a testcase probably during the weekend when I have some time. As mentioned, it seems that the Parameter "fix.external.refs.com.oxygenxml" breaks all builds event when needed.

Thanks
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: PDF Output without images

Post by sorin_ristache »

If you can send us some files for a testcase for the missing image problem that would help us to track down the bug and fix it.


Thank you,
Sorin
Radu
Posts: 9473
Joined: Fri Jul 09, 2004 5:18 pm

Re: PDF Output without images

Post by Radu »

Hi,
As mentioned, it seems that the Parameter "fix.external.refs.com.oxygenxml" breaks all builds event when needed.
We reproduced the problem on our side when running the transformation from the Oxygen Eclipse plugin and it will be fixed in Oxygen 15.2 which will probably be available at the beginning of 2014.

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