Convert Image to PDF with FOP


How to convert an image file into a PDF file with FOP?



FOP allows you to convert a single image file into a PDF file without any XSL-FO format file. Here is how to do this:

\fyicenter>cd \local\fop-2.2\fop

\local\fop-2.2\fop>fop -imagein examples\fo\graphics\page.gif \temp\page.pdf
... processEvent
INFO: Rendered page #1.

The output PDF file is located at \temp\page.pdf. Open it with a PDF viewer, you will see something like this:
FOP Example - Convert GIF to PDF

The same example is provided in FOP 2.2, 2.1, and 2.0.


⇒ "FOP -awt" - Generate Output on Screen

⇐ Run Example in FOP

⇑ FOP Commands and Examples

⇑⇑ FAQ for FOP (Formatting Object Processor)

2016-07-03, 3021👍, 0💬