Implementing XSL-Formatting Objects

Everyone loves a well-designed Web page, but I hope you never tried to print one and found out that it resulted in a big mess and maybe some unhappy users. There are many technologies that you can use to solve this problem, but the majority of them require spending some money and time.

The best way to learn how to use FOP is to create a sample. For example, let's imagine that we need to generate a PDF file with the price list of the ACME Corporation. It should look like the following:

To test it, we need to run it using the command prompt. From the fop directory, type Fop.bat sample.fo sample.pdf. If everything is set correctly, this operation should generate a PDF file named sample.pdf. Open the file sample.pdf from Acrobat Reader and you should see something like the figure above.