Run simplecol.fo Example in fop-2.0-bin.zip

Q

How to run the "simplecol.fo" example in fop-2.0-bin.zip to generated a PDF file?

✍: FYIcenter.com

A

fop-2.0-bin.zip comes with an example XSL-FO file, simplecol.fo, which shows how to generate multiple columns in PDF. You can use the "fop" command to convert it into a PDF file:

\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 examples\fo\region_body\simplecol.fo \temp\simplecol.pdf
... org.apache.fop.apps.FopConfParser configure
INFO: Default page-height set to: 11in
... org.apache.fop.apps.FopConfParser configure
INFO: Default page-width set to: 8.26in
Nov 15, 2015 10:43:25 AM org.apache.fop.events.LoggingEventListener processEvent
INFO: Rendered page #1.

The output PDF file is located at \temp\simplecol.pdf. Open it with a PDF viewer, you will see something like this:

Back to FAQ on FOP (Formatting Objects Processor).

2016-07-03, 1081👍, 0💬