开发者

Regarding external-document in FOP

开发者 https://www.devze.com 2023-01-15 12:12 出处:网络
I am creating pdf file through the XML, XSL and FOP. I want PDF file contents to display external file contents such as word document.

I am creating pdf file through the XML, XSL and FOP. I want PDF file contents to display external file contents such as word document. I know for displaying image in PDF we use but what tag we should to display file contents other than pdf file type.

There's a FOP extension that claims to be able to do this:

jeremias-maerki.ch/development/fop/index.html

Also see xmlgraphics.apache.org/fop/1.0/extensions.html#external-document

When I used in this way

xmlns:fox="http://xmlgraphics.apache.org/fop/extensions"

开发者_StackOverflow社区 content-type="pdf" src="C:\temp\reports\p2.pdf"/>

I am getting exception as

org.apache.fop.apps.FOPException: Error(Unknown location): No element mapping definition found for fox:external-document

Let me know the reason.

THanks in advance.


I'd say you're probably using an old Apache FOP version which doesn't have the fox:external-document extension, yet. Please upgrade to FOP 1.0 (or at least 0.95).


Change the namespace from:

http://xml.apache.org/fop/extensions

to

http://xmlgraphics.apache.org/fop/extensions
0

精彩评论

暂无评论...
验证码 换一张
取 消