generate pdf with calabash and apache fop
Posted: Tue Dec 16, 2014 9:48 am
Hi,
I'm trying to convert my xslt transformation szenario for generating pdf files to an xproc transformation scenario. However, every pdf file I generated to far could not be opened by any reader cause it is invalid.
Here is my xproc file:
Adding an fop configuration file with p:with-param (the same I uee for the oxygen built in fop) didn't change anything. So I'm quite lost now.
Does anybody have any working example for generating a pdf with apache fop and calabash as an oxygen transformation scenario?
Thanks and regards,
Patrik
I'm trying to convert my xslt transformation szenario for generating pdf files to an xproc transformation scenario. However, every pdf file I generated to far could not be opened by any reader cause it is invalid.
Here is my xproc file:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<p:declare-step
xmlns:p="http://www.w3.org/ns/xproc"
xmlns:c="http://www.w3.org/ns/xproc-step"
version="2.0">
<p:input port="source"/>
<p:output port="result">
<p:pipe port="result" step="pdf"/>
</p:output>
<p:xsl-formatter name="pdf">
<p:input port="source">
<p:inline>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master master-name="my-page">
<fo:region-body margin="1in"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="my-page">
<fo:flow flow-name="xsl-region-body">
<fo:block>Hello World!</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
</p:inline>
</p:input>
<p:input port="parameters">
<p:empty/>
</p:input>
<p:with-option name="href" select="'Test.pdf'"/>
<p:with-option name="content-type" select="'application/pdf'"/>
</p:xsl-formatter>
</p:declare-step>
Does anybody have any working example for generating a pdf with apache fop and calabash as an oxygen transformation scenario?
Thanks and regards,
Patrik