Run images.fo Example in FOP

Q

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

✍: FYIcenter.com

A

FOP comes with an example XSL-FO file, images.fo, which shows how to embed GIF and JPEG images into the XSL-FO file using external-graphic. You can use the "fop" command to convert it into a PDF file:

fyicenter> cd \local\fop-2.x\fop

fyicenter> fop examples\fo\basic\images.fo \temp\images.pdf
...org.apache.fop.events.LoggingEventListener processEvent
INFO: Rendered page #1.
...org.apache.fop.events.LoggingEventListener processEvent
INFO: Rendered page #2.
...org.apache.fop.events.LoggingEventListener processEvent
INFO: Rendered page #3.
...org.apache.fop.events.LoggingEventListener processEvent
INFO: Rendered page #4.
...org.apache.fop.events.LoggingEventListener processEvent
WARNING: The contents of fo:external-graphic line 1 exceed 
the available area in the inline-progression direction by 
200 millipoints. (See position 150:160)
...org.apache.fop.events.LoggingEventListener processEvent
WARNING: The contents of fo:external-graphic line 1 exceed 
the available area in the inline-progression direction by 
200 millipoints. (See position 158:182)
...org.apache.fop.events.LoggingEventListener processEvent
INFO: Rendered page #5.

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

 

Run pdfoutline.fo Example in FOP

Run simple.fo Example in FOP

FOP Commands and Examples

⇑⇑ FAQ for FOP (Formatting Object Processor)

2016-06-30, 3051🔥, 0💬