com.waveset.util
Class PdfReportRenderer

java.lang.Object
  extended bycom.waveset.util.PdfReportRenderer

public class PdfReportRenderer
extends java.lang.Object

A simple rendering utility that takes an XML document or Report object and turns it into PDF.


Field Summary
static int BOLD
          Font styles
static java.lang.String code_id
           
static boolean EMBEDDED
          Whether or not to embed the font in the PDF.
static int ITALIC
           
static int NORMAL
           
static boolean NOT_EMBEDDED
           
 
Constructor Summary
PdfReportRenderer()
          Build a report renderer.
PdfReportRenderer(java.util.Locale locale)
           
 
Method Summary
static com.lowagie.text.Font getFont(java.lang.String fontName, boolean isEmbedded, int style, int size)
           
static java.util.List getInstalledFonts()
           
 byte[] render(org.w3c.dom.Element report, boolean fragment, java.lang.String chartType)
          Deprecated. This version was left for backwards compatibility. Use versions that accept font information.
 void render(org.w3c.dom.Element report, boolean fragment, java.lang.String chartType, java.io.OutputStream os)
          Deprecated. This version was left for backwards compatibility. Use versions that accept font information.
 void render(org.w3c.dom.Element report, boolean fragment, java.lang.String chartType, java.io.OutputStream os, java.lang.String font, boolean embedFont)
          Begin traversal of the document, emitting the header.
 byte[] render(org.w3c.dom.Element report, boolean fragment, java.lang.String chartType, java.lang.String font, boolean embedFont)
          Begin traversal of the document, emitting the header.
 byte[] render(Report report, boolean fragment, java.lang.String chartType)
          Deprecated. This version was left for backwards compatibility. Use versions that accept font information.
 void render(Report report, boolean fragment, java.lang.String chartType, java.io.OutputStream os)
          Deprecated. This version was left for backwards compatibility. Use versions that accept font information.
 void render(Report report, boolean fragment, java.lang.String chartType, java.io.OutputStream os, java.lang.String font, boolean embedFont)
          Render a Report object.
 byte[] render(Report report, boolean fragment, java.lang.String chartType, java.lang.String font, boolean isEmbedded)
          Render a Report object.
 byte[] render(java.lang.String xmlReport, boolean fragment, java.lang.String chartType)
          Deprecated. This version was left for backwards compatibility. Use versions that accept font information.
 byte[] render(java.lang.String xmlReport, boolean fragment, java.lang.String chartType, java.lang.String font, boolean isEmbedded)
          Render a report document to a PDF document.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

code_id

public static final java.lang.String code_id
See Also:
Constant Field Values

BOLD

public static final int BOLD
Font styles

See Also:
Constant Field Values

NORMAL

public static final int NORMAL
See Also:
Constant Field Values

ITALIC

public static final int ITALIC
See Also:
Constant Field Values

EMBEDDED

public static final boolean EMBEDDED
Whether or not to embed the font in the PDF. Embedding can lead to portability, but it can also _greatly_ increase the size of the file

See Also:
Constant Field Values

NOT_EMBEDDED

public static final boolean NOT_EMBEDDED
See Also:
Constant Field Values
Constructor Detail

PdfReportRenderer

public PdfReportRenderer()
Build a report renderer. There aren't any options at the moment, just build one and call the render method.


PdfReportRenderer

public PdfReportRenderer(java.util.Locale locale)
Method Detail

getInstalledFonts

public static java.util.List getInstalledFonts()
Returns:
a List of all installed fonts

getFont

public static com.lowagie.text.Font getFont(java.lang.String fontName,
                                            boolean isEmbedded,
                                            int style,
                                            int size)

render

public byte[] render(java.lang.String xmlReport,
                     boolean fragment,
                     java.lang.String chartType,
                     java.lang.String font,
                     boolean isEmbedded)
              throws WavesetException
Render a report document to a PDF document.

Throws:
WavesetException

render

public byte[] render(java.lang.String xmlReport,
                     boolean fragment,
                     java.lang.String chartType)
              throws WavesetException
Deprecated. This version was left for backwards compatibility. Use versions that accept font information.

Render a report document to a PDF document.

Throws:
WavesetException

render

public byte[] render(Report report,
                     boolean fragment,
                     java.lang.String chartType,
                     java.lang.String font,
                     boolean isEmbedded)
              throws WavesetException
Render a Report object. This is expected to wrap a element.

Throws:
WavesetException

render

public byte[] render(Report report,
                     boolean fragment,
                     java.lang.String chartType)
              throws WavesetException
Deprecated. This version was left for backwards compatibility. Use versions that accept font information.

Render a Report object. This is expected to wrap a element.

Throws:
WavesetException

render

public void render(Report report,
                   boolean fragment,
                   java.lang.String chartType,
                   java.io.OutputStream os,
                   java.lang.String font,
                   boolean embedFont)
            throws WavesetException
Render a Report object. This is expected to wrap a element. Note: The OutputStream provided cannot be assumed to be a ByteArrayOutputStream. This method is provided for rendering a document to be downloaded directly.

Throws:
WavesetException

render

public void render(Report report,
                   boolean fragment,
                   java.lang.String chartType,
                   java.io.OutputStream os)
            throws WavesetException
Deprecated. This version was left for backwards compatibility. Use versions that accept font information.

Render a Report object. This is expected to wrap a element. Note: The OutputStream provided cannot be assumed to be a ByteArrayOutputStream. This method is provided for rendering a document to be downloaded directly.

Throws:
WavesetException

render

public byte[] render(org.w3c.dom.Element report,
                     boolean fragment,
                     java.lang.String chartType,
                     java.lang.String font,
                     boolean embedFont)
              throws WavesetException
Begin traversal of the document, emitting the header.

Throws:
WavesetException

render

public byte[] render(org.w3c.dom.Element report,
                     boolean fragment,
                     java.lang.String chartType)
              throws WavesetException
Deprecated. This version was left for backwards compatibility. Use versions that accept font information.

Begin traversal of the document, emitting the header.

Throws:
WavesetException

render

public void render(org.w3c.dom.Element report,
                   boolean fragment,
                   java.lang.String chartType,
                   java.io.OutputStream os,
                   java.lang.String font,
                   boolean embedFont)
            throws WavesetException
Begin traversal of the document, emitting the header.

Throws:
WavesetException

render

public void render(org.w3c.dom.Element report,
                   boolean fragment,
                   java.lang.String chartType,
                   java.io.OutputStream os)
            throws WavesetException
Deprecated. This version was left for backwards compatibility. Use versions that accept font information.

Begin traversal of the document, emitting the header.

Throws:
WavesetException