FOP Extensions

Here should go questions about transforming XML with XSLT and FOP.
ahmed.alnoman
Posts: 3
Joined: Sun Jan 04, 2009 10:14 pm

FOP Extensions

Post by ahmed.alnoman »

Hello everyone,
I have been recently using the Oxygen Editor to create XSLFO stylesheets. One feature that i have been looking into recently is how to embed a PDF or TIFF images images into the generated PDF document. On the Apache website i have read that this is currently possible, however, their extension only supports single paged PDFs or TIFF that can be embedded. I have been trying to use their extension with the Oxygen editor, however i seem to be doing something wrong. please note that i m a newbie and any help to get the:
<fox:external-document ....> feature will be highly appreciated.

Thanks.
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: FOP Extensions

Post by sorin_ristache »

Hello,

The support for images is specific for each FO processor. PNG and TIFF images are supported by the built-in FO processor of Oxygen but you need to install an image library as specified in the User Manual.


Regards,
Sorin
ahmed.alnoman
Posts: 3
Joined: Sun Jan 04, 2009 10:14 pm

Re: FOP Extensions

Post by ahmed.alnoman »

Thanks for your help, Sorin. But is there any where that i can find more information on how to embed PDF images into the PDF document using the
<fox:external-document . . > feature that is mentioned on the Apache FOP website

http://xmlgraphics.apache.org/fop/0.95/ ... l-document

Thanks again for your help.
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: FOP Extensions

Post by sorin_ristache »

Hello,

The element fox:external-document that you mention and that is explained on the Apache FOP website can help you only for inserting a TIFF document in an FO document that will be processed by Apache FOP for generating the output PDF document. If you want to edit an existing PDF document and add a TIFF image you should try a PDF editing tool, not a PDF generating tool like Apache FOP.


Regards,
Sorin
ahmed.alnoman
Posts: 3
Joined: Sun Jan 04, 2009 10:14 pm

Re: FOP Extensions

Post by ahmed.alnoman »

Exactly, that's what i want to do, is to insert a TIFF and/or a PDF image into the FO object. However, oxygen doesn't seem to have the <fox: ..> extension. Is there a way that i can add it to the Oxygen Editor, or let the editor know about it? Do i need to update the Oxygen Editor? I really don't know what i can do to get it to work, everything else with Apache FOP on the Oxygen editor works fine except this feature?

Thanks again Sorin, and sorry if i didn't explain my question well at the very beginning :)
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: FOP Extensions

Post by sorin_ristache »

Oxygen 10.0 includes FOP version 0.95 which is required for fox:external-document so if your TIFF document has only one page (as specified in the note about the current limitation of Apache FOP) the TIFF document that you include in your XSL-FO document using fox:external-document should be processed and included correctly in the result PDF document. Do you use Oxygen 10.0? Did you use fox:external-document in a context where fo:page-sequence would also be accepted in an FO document? If you did that and if you try to include a one-page TIFF document but it is not included correctly in the PDF result please post a sample FO document and the URL for downloading a sample TIFF document for reproducing the problem. As alternative you can send sample FO and TIFF files on the page with the support form.


Regards,
Sorin
Post Reply