generate pdf with calabash and apache fop
Here should go questions about transforming XML with XSLT and FOP.
-
- Posts: 280
- Joined: Thu Nov 28, 2013 9:32 am
- Location: Hamburg/Germany
- Contact:
generate pdf with calabash and apache fop
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
-
- Posts: 2879
- Joined: Tue May 17, 2005 4:01 pm
Re: generate pdf with calabash and apache fop
Hi,
In case anyone else encounters this, the problem turned out to be the generation of PDF with Calabash 1.0.18 (bundled with Oxygen v16.0) which has a bug in p:xsl-formatter. This bug is fixed in Calabash 1.0.19 and later (Oxygen v16.1 bundles 1.0.20):
Fixed bug where the output file wasn't being properly closed in p:xsl-formatter.
So, the solution is to either upgrade the version of Calabash bundled with Oxygen to 1.0.19 (or later) or upgrade Oxygen to v16.1 (recommended).
Regards,
Adrian
In case anyone else encounters this, the problem turned out to be the generation of PDF with Calabash 1.0.18 (bundled with Oxygen v16.0) which has a bug in p:xsl-formatter. This bug is fixed in Calabash 1.0.19 and later (Oxygen v16.1 bundles 1.0.20):
Fixed bug where the output file wasn't being properly closed in p:xsl-formatter.
So, the solution is to either upgrade the version of Calabash bundled with Oxygen to 1.0.19 (or later) or upgrade Oxygen to v16.1 (recommended).
Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
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