net.sf.jasperreports.engine.export
Class JRPdfExporter
java.lang.Object
net.sf.jasperreports.engine.JRAbstractExporter
net.sf.jasperreports.engine.export.JRPdfExporter
- All Implemented Interfaces:
- JRExporter
public class JRPdfExporter
- extends JRAbstractExporter
Exports a JasperReports document to PDF format. It has binary output type and exports the document to
a free-form layout.
- Version:
- $Id: JRPdfExporter.java 4644 2011-10-03 15:43:36Z teodord $
- Author:
- Teodor Danciu (teodord@users.sourceforge.net)
Fields inherited from class net.sf.jasperreports.engine.JRAbstractExporter |
dateFormatCache, endPageIndex, filter, globalOffsetX, globalOffsetY, hyperlinkProducerFactory, isModeBatch, jasperPrint, jasperPrintList, numberFormatCache, parameters, PROPERTY_DEFAULT_FILTER_FACTORY, PROPERTY_SUFFIX_DEFAULT_FILTER_FACTORY, startPageIndex |
Method Summary |
protected void |
addBookmark(int level,
java.lang.String title,
int x,
int y)
|
protected void |
exportBottomPen(JRPen leftPen,
JRPen bottomPen,
JRPen rightPen,
JRPrintElement element)
|
protected void |
exportBox(JRLineBox box,
JRPrintElement element)
|
protected void |
exportElements(java.util.Collection<JRPrintElement> elements)
|
protected void |
exportEllipse(JRPrintEllipse ellipse)
|
protected void |
exportFrame(JRPrintFrame frame)
|
protected void |
exportGenericElement(JRGenericPrintElement element)
|
void |
exportImage(JRPrintImage printImage)
|
protected void |
exportLeftPen(JRPen topPen,
JRPen leftPen,
JRPen bottomPen,
JRPrintElement element)
|
protected void |
exportLine(JRPrintLine line)
|
protected void |
exportPage(JRPrintPage page)
|
protected void |
exportPen(JRPen pen,
JRPrintElement element)
|
protected void |
exportRectangle(JRPrintRectangle rectangle)
|
void |
exportReport()
Actually starts the export process. |
protected void |
exportReportToStream(java.io.OutputStream os)
|
protected void |
exportRightPen(JRPen topPen,
JRPen bottomPen,
JRPen rightPen,
JRPrintElement element)
|
void |
exportText(JRPrintText text)
|
protected void |
exportTopPen(JRPen topPen,
JRPen leftPen,
JRPen rightPen,
JRPrintElement element)
|
protected Chunk |
getChunk(java.util.Map<java.text.AttributedCharacterIterator.Attribute,java.lang.Object> attributes,
java.lang.String text,
java.util.Locale locale)
|
protected java.lang.String |
getExporterKey()
|
protected Font |
getFont(java.util.Map<java.text.AttributedCharacterIterator.Attribute,java.lang.Object> attributes,
java.util.Locale locale,
boolean setFontLines)
Creates a PDF font. |
protected Phrase |
getPhrase(java.text.AttributedString as,
java.lang.String text,
JRPrintText textElement)
|
protected Image |
getPxImage()
|
protected boolean |
hasStrikethrough(java.util.Map<java.text.AttributedCharacterIterator.Attribute,java.lang.Object> textAttributes)
|
protected boolean |
hasUnderline(java.util.Map<java.text.AttributedCharacterIterator.Attribute,java.lang.Object> textAttributes)
|
protected void |
initBookmarks()
|
protected static void |
registerFonts()
|
protected void |
setAnchor(Chunk chunk,
JRPrintAnchor anchor,
JRPrintElement element)
|
protected void |
setHyperlinkInfo(Chunk chunk,
JRPrintHyperlink link)
|
protected void |
writePageAnchor(int pageIndex)
|
Methods inherited from class net.sf.jasperreports.engine.JRAbstractExporter |
createFilter, defaultParseNumber, getBooleanCellValue, getBooleanParameter, getCharacterParameter, getCustomHandler, getDateCellValue, getDateFormat, getFloatParameter, getHyperlinkProducer, getIntegerParameter, getLocale, getNumberCellValue, getNumberFormat, getOffsetX, getOffsetY, getParameter, getParameterResolver, getParameters, getReportContext, getStringArrayParameter, getStringParameter, getStringParameterOrDefault, getStyledText, getStyledText, getTextFormatFactoryClass, getTextLocale, getTextTimeZone, getTextValue, getTextValueString, reset, resetClassLoader, resetExportContext, restoreElementOffsets, setClassLoader, setExportContext, setFrameElementsOffset, setHyperlinkProducerFactory, setInput, setJasperPrint, setOffset, setOffset, setOutput, setPageRange, setParameter, setParameters, setReportContext |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PDF_EXPORTER_PROPERTIES_PREFIX
public static final java.lang.String PDF_EXPORTER_PROPERTIES_PREFIX
- See Also:
- Constant Field Values
PDF_EXPORTER_KEY
public static final java.lang.String PDF_EXPORTER_KEY
- The exporter key, as used in
GenericElementHandlerEnviroment.getHandler(net.sf.jasperreports.engine.JRGenericElementType, String)
.
- See Also:
- Constant Field Values
JR_PAGE_ANCHOR_PREFIX
protected static final java.lang.String JR_PAGE_ANCHOR_PREFIX
- See Also:
- Constant Field Values
fontsRegistered
protected static boolean fontsRegistered
document
protected Document document
pdfContentByte
protected PdfContentByte pdfContentByte
pdfWriter
protected PdfWriter pdfWriter
imageTesterDocument
protected Document imageTesterDocument
imageTesterPdfContentByte
protected PdfContentByte imageTesterPdfContentByte
tagHelper
protected JRPdfExporterTagHelper tagHelper
progressMonitor
protected JRExportProgressMonitor progressMonitor
reportIndex
protected int reportIndex
forceSvgShapes
protected boolean forceSvgShapes
isCreatingBatchModeBookmarks
protected boolean isCreatingBatchModeBookmarks
isCompressed
protected boolean isCompressed
isEncrypted
protected boolean isEncrypted
is128BitKey
protected boolean is128BitKey
userPassword
protected java.lang.String userPassword
ownerPassword
protected java.lang.String ownerPassword
permissions
protected int permissions
pdfVersion
protected java.lang.Character pdfVersion
pdfJavaScript
protected java.lang.String pdfJavaScript
printScaling
protected java.lang.String printScaling
loadedImagesMap
protected java.util.Map<JRRenderable,com.lowagie.text.Image> loadedImagesMap
pxImage
protected Image pxImage
exporterContext
protected JRPdfExporterContext exporterContext
JRPdfExporter
public JRPdfExporter()
getPxImage
protected Image getPxImage()
exportReport
public void exportReport()
throws JRException
- Description copied from interface:
JRExporter
- Actually starts the export process.
- Specified by:
exportReport
in interface JRExporter
- Specified by:
exportReport
in class JRAbstractExporter
- Throws:
JRException
exportReportToStream
protected void exportReportToStream(java.io.OutputStream os)
throws JRException
- Throws:
JRException
writePageAnchor
protected void writePageAnchor(int pageIndex)
throws DocumentException
- Throws:
DocumentException
exportPage
protected void exportPage(JRPrintPage page)
throws JRException,
DocumentException,
java.io.IOException
- Throws:
JRException
DocumentException
java.io.IOException
exportElements
protected void exportElements(java.util.Collection<JRPrintElement> elements)
throws DocumentException,
java.io.IOException,
JRException
- Throws:
DocumentException
java.io.IOException
JRException
exportLine
protected void exportLine(JRPrintLine line)
exportRectangle
protected void exportRectangle(JRPrintRectangle rectangle)
exportEllipse
protected void exportEllipse(JRPrintEllipse ellipse)
exportImage
public void exportImage(JRPrintImage printImage)
throws DocumentException,
java.io.IOException,
JRException
- Throws:
DocumentException
java.io.IOException
JRException
setHyperlinkInfo
protected void setHyperlinkInfo(Chunk chunk,
JRPrintHyperlink link)
getPhrase
protected Phrase getPhrase(java.text.AttributedString as,
java.lang.String text,
JRPrintText textElement)
getChunk
protected Chunk getChunk(java.util.Map<java.text.AttributedCharacterIterator.Attribute,java.lang.Object> attributes,
java.lang.String text,
java.util.Locale locale)
hasUnderline
protected boolean hasUnderline(java.util.Map<java.text.AttributedCharacterIterator.Attribute,java.lang.Object> textAttributes)
hasStrikethrough
protected boolean hasStrikethrough(java.util.Map<java.text.AttributedCharacterIterator.Attribute,java.lang.Object> textAttributes)
getFont
protected Font getFont(java.util.Map<java.text.AttributedCharacterIterator.Attribute,java.lang.Object> attributes,
java.util.Locale locale,
boolean setFontLines)
- Creates a PDF font.
- Parameters:
attributes
- the text attributes of the fontlocale
- the locale for which to create the fontsetFontLines
- whether to set underline and strikethrough as font style
- Returns:
- the PDF font for the specified attributes
exportText
public void exportText(JRPrintText text)
throws DocumentException
- Throws:
DocumentException
exportBox
protected void exportBox(JRLineBox box,
JRPrintElement element)
exportPen
protected void exportPen(JRPen pen,
JRPrintElement element)
exportTopPen
protected void exportTopPen(JRPen topPen,
JRPen leftPen,
JRPen rightPen,
JRPrintElement element)
exportLeftPen
protected void exportLeftPen(JRPen topPen,
JRPen leftPen,
JRPen bottomPen,
JRPrintElement element)
exportBottomPen
protected void exportBottomPen(JRPen leftPen,
JRPen bottomPen,
JRPen rightPen,
JRPrintElement element)
exportRightPen
protected void exportRightPen(JRPen topPen,
JRPen bottomPen,
JRPen rightPen,
JRPrintElement element)
registerFonts
protected static void registerFonts()
initBookmarks
protected void initBookmarks()
addBookmark
protected void addBookmark(int level,
java.lang.String title,
int x,
int y)
setAnchor
protected void setAnchor(Chunk chunk,
JRPrintAnchor anchor,
JRPrintElement element)
exportFrame
protected void exportFrame(JRPrintFrame frame)
throws DocumentException,
java.io.IOException,
JRException
- Throws:
DocumentException
java.io.IOException
JRException
exportGenericElement
protected void exportGenericElement(JRGenericPrintElement element)
getExporterKey
protected java.lang.String getExporterKey()
- Specified by:
getExporterKey
in class JRAbstractExporter
© 2001-2010 Jaspersoft Corporation www.jaspersoft.com