Diff for Tips for debugging PDF2 plugin PDF issues
Sun, 2007-11-25 07:44 by Bruce Esrig | Sun, 2007-11-25 07:46 by Bruce Esrig | ||
---|---|---|---|
Tags: XSL/XSLT customization, Product extensions, Publishing pipeline | Tags: Plugins | ||
< previous diff | next diff > | ||
Changes to Body | |||
Line 36 | Line 36 | ||
But, if that's not the case, then you tweak the FO until it generates the PDF you want, then you fix the XSLT to generate the FO you want.<br />
| But, if that's not the case, then you tweak the FO until it generates the PDF you want, then you fix the XSLT to generate the FO you want.<br />
| ||
<br />
| <br />
| ||
- | -- Contributed by Steve Anderson (steveo@member.fsf.org)
| + | -- Contributed by Steve Anderson (steveo@member.fsf.org)
|
Revision of Sun, 2007-11-25 07:46:
Tips for debugging PDF2 plugin PDF issues
Keeping the generated FO file
One of the most important things to do to debug the PDF generated by the PDF2 plugin (also known as the Idiom PDF plugin) is to look at the FO file the plugin generates. The plugin, by default, deletes all intermediate files, though, so you need to modify the plugin to save those files.
To stop the plugin from deleting the FO file:
Usually issues can be diagnosed by looking at the FO to see what is really getting put into it, as opposed to what you think is getting put into it.
But, if that's not the case, then you tweak the FO until it generates the PDF you want, then you fix the XSLT to generate the FO you want.
-- Contributed by Steve Anderson (steveo@member.fsf.org)
One of the most important things to do to debug the PDF generated by the PDF2 plugin (also known as the Idiom PDF plugin) is to look at the FO file the plugin generates. The plugin, by default, deletes all intermediate files, though, so you need to modify the plugin to save those files.
To stop the plugin from deleting the FO file:
- Open demo\fo\build.xml in a n editor.
- Search for the line
<antcall target="transform.fo2pdf"> - Change that target to look like the following:
<antcall target="transform.fo2pdf">
<param name="inputFile" value="${dita.map.output.dir}/topic.fo"/>
<param name="outputFile" value="${outputFile}"/>
<param name="xep.failOnError" value="${xep.failOnError}"/>
</antcall>
<!-- Keep the fo around for debugging purposes -->
<!--
<delete>
<fileset dir="${buildDir}" includes="stage?.*"/>
<fileset dir="${dita.map.output.dir}" includes="topic.fo"/>
</delete>
-->
</target>
Usually issues can be diagnosed by looking at the FO to see what is really getting put into it, as opposed to what you think is getting put into it.
But, if that's not the case, then you tweak the FO until it generates the PDF you want, then you fix the XSLT to generate the FO you want.
-- Contributed by Steve Anderson (steveo@member.fsf.org)