Convert Image to PDF with


How to convert an image file into a PDF file with



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
... 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💬