skip to main content
Charts > Programmer's documentation > Developing with the JViews Charts SDK > Generating PDF
 
Generating PDF
The PDF generation uses the standard XSL-FOformat as intermediate format:
IlvChart ---> XSL-FO ---> PDF
The XSL-FO format allows you to fine-tune the details of the page layout. The generation of XSL-FO from an IlvChart is done through one of the following APIs:
*IlvChart.paintToFO
*IlvFOUtil.paintToFO
This step requires the availability of batik-jviews-x.y.jar in the CLASSPATH.
The second step, the conversion from FO to PDF, uses the Apache™ FOP package. It requires the presence of the following .jars in the CLASSPATH:
*fop-0.20.5.jar
*fop-avalon-framework-0.20.5.jar
*fop-batik-0.20.5.jar
The XSL-FO generation is usable in both multithreading modes (see Choosing the multithreading mode). For the using event thread mode (that is, typically a Swing application) you will use IlvChart.paintToFO or IlvFOUtil.paintToFO, while for the current thread mode (that is, typically in a Web server) you will use IlvChart.paintToFOCurrentThread, or apply IlvFOUtil.paintToFO to a chart with isUsingEventThread() = true.
You can find a sample showing the PDF generation in samples/tablemodel/.
NOTE JViews Charts does not support the generation of interactive PDF documents (PDF with embedded JavaScript™).

Copyright © 2018, Rogue Wave Software, Inc. All Rights Reserved.