Commercial FO processors in eXist-db

2019-09-14 11:14发布

For my project, I would like to test XEP and AH Formatter. I like FOP but in some cases it really fails (floats, crop marks, pdf/x standards, etc.) and I need to know some alternatives.

XEP

With XEP I am very close. I have copied all jars into $EXIST_HOME/lib/user and changed the adapter in $EXIST_HOME/conf.xml. Besides, I have uploaded the xep.xml config file into the database.

Testing XQuery:

xquery version "3.0";

declare namespace fo = "http://46.28.111.241:8081/exist/db/apps/bunny/modules/fop";

let $config := doc('/db/apps/bunny/test/xep.xml')
let $fo := doc('/db/apps/bunny/data/test.fo')
let $pdf := xslfo:render($fo, "application/pdf", (), $config)
return response:stream-binary($pdf, "application/pdf", "output.pdf")

It throws:

exerr:ERROR org.exist.dom.persistent.NodeProxy cannot be cast to org.w3c.dom.Node [at line 7, column 13]

AH Formatter

With AH Formatter, I am lost at the moment. It does not include any specific jar file I could copy into $EXIST_HOME/lib/user, or at least it does not seem so. On AH site there is a note about using AH Formatter on a linux machine but this remark does not help in the whole process of including that into eXist.

The installation includes several folders which are all mentioned in the run.sh file, it is much more fragmented app than XEP.

I am testing on Ubuntu Server 14.04 and eXist-db RC01.

1条回答
Luminary・发光体
2楼-- · 2019-09-14 11:21

eXist at the moment only supports Apache FOP or RenderX XEP.

@wolfgang-meier previously added support for Antenna House formatter (22 August 2012, git commit: ffda3b7), but he then again removed it on 12 Sept 2012 (git commit: 5a2a0aa) with the comment that it would be moved to a separate project... I cannot actually find the separate project.

If you want to use Antenna House, I would suggest contacting Wolfgang or getting the code from the relevant Git Commits.

Regards the error you have with RenderX XEP, when you get the error exerr:ERROR org.exist.dom.persistent.NodeProxy cannot be cast to org.w3c.dom.Node there should also be an associated stack trace in your $EXIST_HOME/webapp/WEB-INF/logs/exist.log, can you please post the relevant section of that also?

查看更多
登录 后发表回答