High-Quality PDF Generation of Node Content with Apache FOP

Track: 
Coder
Experience: 
Advanced

Although there are some excellent PHP libraries for converting HTML to PDF in Drupal, many times you are left wanting more control over the exact layout and appearance of the generated PDF. Apache FOP, a Java based print formatter for XSLT formatting objects (XSLT-FO), allows precise control of layout to the field level and practically limitless control over the appearance of the generated PDF - to include unique headers, watermarks and pagination.

This session will teach you how to set up the PHP/Java bridge, and how to utilize it to invoke Java methods from your Drupal module. Specifically, we'll walkthrough the creation of a Drupal module for creating a PDF generation Action utilizing the PHP/Java bridge to call Apache FOP to generate the PDF. Then we will walk-through the configuration of Triggers for executing that action whenever a node is created or updated.

In addition to the more Drupal specific knowledge, you will also have the opportunity to learn the basics of XSLT-FO to include some excellent tips for generating beautiful PDFs.

Intended audience: 

The intended audience of this session is somewhat experienced Drupal developers that need to generate desktop publishing quality PDFs of their node content - including support for CCK fields.

Questions answered by this session
Question 1: 
What are the advantages of Java based Apache FOP for generating PDFs over other native PHP solutions?
Question 2: 
How do you set up the PHP/Java bridge and what does it do for you?
Question 3: 
What are some ways to generate valid XML from a node?
Question 4: 
How to write a simple Drupal action?
Question 5: 
What are the basics of XSLT formatting object in regards to generating a high-quality PDF?
3.454545
Your rating: None Average: 3.5 (22 votes)

Diamond Sponsors

 
VPS NET
Palantir.net

Platinum sponsors

 
Trellon
workhabit

Gold Sponsors

 
NorthPoint
Chapter Three
Duo
Treehouse Agency
Drupal Connect
HotDrupal.com
Microsoft