| java.lang.Object dinamica.AbstractModule dinamica.GenericOutput dinamica.AbstractPDFOutput
AbstractPDFOutput | public class AbstractPDFOutput extends GenericOutput (Code) | | Base class to produce PDF output modules (hand made reports)
based on the powerful IText-PDF open source component.
This super class provides several common utility methods, including
the abiity to auto-read the report header, footer and title from web.xml
or config.xml, and to retrieve images from URLs (local or remotes), which is
used to insert charts into the PDF document by reusing a server-side chart Action,
or to insert another dinamically generated image, like a BarCode. The method to retrieve
via HTTP is session sensitive, meaning that it can reuse the same session ID, which is
a requirement when accessing local resources that are session-sensitive, like chart Actions.
In order to reuse this class, you must override the method createPDF(), you may use
the default implementation as a code template. For more information look into
the /source and /templates resources included with Dinamica distribution.
(c) 2004 Martin Cordova
This code is released under the LGPL license
Dinamica Framework - http://www.martincordova.com
author: Martin Cordova (dinamica@martincordova.com) |
createPDF | protected void createPDF(GenericTransaction data, ByteArrayOutputStream buf) throws Throwable(Code) | | Receives a byte buffer that should be filled with resulting PDF.
Parameters: data - Data module that provides recordsets to this output module Parameters: buf - Buffer to print PDF, then used to send to browser throws: Throwable - |
getFooter | protected String getFooter()(Code) | | Get default report footer (parameter pdf-footer) from web.xml (context-param) or current config.xml (custom element).
Any subclass may override this method.
Report footer text or NULL |
getHeader | protected String getHeader()(Code) | | Get default report header (parameter pdf-header) from web.xml (context-param) or current config.xml (custom element).
Any subclass may override this method.
Report header text or NULL |
getPDFConfigValue | protected String getPDFConfigValue(String param)(Code) | | Read a PDF-related config parameter. Will search first
in the Action config.xml, then in web.xml file.
Parameters: param - The corresponding value or NULL if not found. |
getReportTitle | protected String getReportTitle()(Code) | | Get default report title (parameter pdf-title) from web.xml (context-param) or current config.xml (custom element).
Most of the time the report title should be defined in config.xml because it is
specific to the report.
Any subclass may override this method.
Report title text or NULL |
|
|