Run simple.fo Example in FOP

Q

How to run the "simple.fo" example in FOP to generated a PDF file?

✍: FYIcenter.com

A

FOP comes with an example XSL-FO file, simple.fo, which gives use a first impression of the structure of an XSL-FO file. You can use the "fop" command to convert it into a PDF file:

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

\local\fop-2.2\fop>echo %java_home%
   \Program Files\Java\jdk1.8.0_131\

\local\fop-2.2\fop>fop examples\fo\basic\simple.fo \temp\simple.pdf
...org.apache.fop.events.LoggingEventListener processEvent
INFO: Rendered page #1.

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

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

 

⇒ Run images.fo Example in FOP

⇐ List of XSL-FO Examples in FOP

⇑ FOP Commands and Examples

⇑⇑ FAQ for FOP (Formatting Object Processor)

2016-06-30, 2120👍, 0💬