Convert Image to PDF with fop-2.0-bin.zip

Q

How to convert an image file into a PDF file with fop-2.0-bin.zip?

✍: FYIcenter.com

A

FOP 2.0 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.0

\local\fop-2.0>echo %java_home%
   \Program Files\Java\jdk1.8.0_45\

\local\fop-2.0>fop -imagein examples\fo\graphics\page.gif \temp\page.pdf
... org.apache.fop.events.LoggingEventListener 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:

Back to FAQ on FOP (Formatting Objects Processor).

2016-07-03, 1084👍, 0💬