Winona Salesky
2017-06-07 02:46:50 UTC
Hi All,
I am trying to get XSL-FO working with my eXist v 3.1 installation. (Was
working with 2.2, not sure about 3.0)
Test case:
xquery version "3.1";
declare namespace xslfo="http://exist-db.org/xquery/xslfo";
let $fo :=
<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="0.5in"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="my-page">
<fo:flow flow-name="xsl-region-body">
<fo:block>Test of Page</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
let $pdf := xslfo:render($fo, "application/pdf", ())
return response:stream-binary($pdf, "application/pdf", "output.pdf")
Error (when run in eXide):
Could not initialize class
org.apache.xmlgraphics.image.loader.spi.ImageImplRegistry
The XSLFO module has been enabled in conf.xml and in
$EXIST_HOME/extensions/build.properties
Any ideas?
Thanks,
-Winona
I am trying to get XSL-FO working with my eXist v 3.1 installation. (Was
working with 2.2, not sure about 3.0)
Test case:
xquery version "3.1";
declare namespace xslfo="http://exist-db.org/xquery/xslfo";
let $fo :=
<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="0.5in"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="my-page">
<fo:flow flow-name="xsl-region-body">
<fo:block>Test of Page</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
let $pdf := xslfo:render($fo, "application/pdf", ())
return response:stream-binary($pdf, "application/pdf", "output.pdf")
Error (when run in eXide):
Could not initialize class
org.apache.xmlgraphics.image.loader.spi.ImageImplRegistry
The XSLFO module has been enabled in conf.xml and in
$EXIST_HOME/extensions/build.properties
Any ideas?
Thanks,
-Winona