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.
Since classic AWT fonts can be sometimes very different from PDF fonts, a font mapping feature was added.
By using the JRExporterParameter.FONT_MAP
parameter, a logical font like "sansserif" can be mapped
to a system specific font, like "Helvetica-BoldOblique". PDF font mapping is a little more complicated, because
for a logical font, PDF cand provide two or more fonts, from the same family but with different styles (like
"Helvetica", "Helvetica-Bold", "Helvetica-BoldOblique"). So every key in the map is a simple bean containing
font family, bold and italic flag, and every value is another bean containing the PDF font name, encoding and
embedding flag.
- Version:
- $Id: JRPdfExporter.java 1511 2006-11-29 19:17:00 +0200 (Wed, 29 Nov 2006) teodord $
- Author:
- Teodor Danciu (teodord@users.sourceforge.net)
- See Also:
FontKey
,
PdfFont
Fields inherited from class net.sf.jasperreports.engine.JRAbstractExporter |
classLoader, classLoaderSet, dateFormatCache, endPageIndex, globalOffsetX, globalOffsetY, isModeBatch, jasperPrint, jasperPrintList, numberFormatCache, parameters, startPageIndex, styledTextParser, urlHandlerFactory, urlHandlerFactorySet |
Methods inherited from class net.sf.jasperreports.engine.JRAbstractExporter |
defaultParseNumber, getBooleanCellValue, getBox, getDateCellValue, getDateFormat, getNumberCellValue, getNumberFormat, getOffsetX, getOffsetY, getParameter, getParameters, getStyledText, getStyledText, getTextFormatFactoryClass, getTextLocale, getTextTimeZone, getTextValue, getTextValueString, reset, resetClassLoader, resetExportContext, restoreElementOffsets, setClassLoader, setExportContext, setFrameElementsOffset, setInput, setOffset, setOutput, setPageRange, setParameter, setParameters |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PDF_FORCE_SVG_SHAPES
public static final java.lang.String PDF_FORCE_SVG_SHAPES
- Property that provides a default value for the
JRPdfExporterParameter.FORCE_SVG_SHAPES
PDF exporter parameter.
- See Also:
JRPdfExporterParameter.FORCE_SVG_SHAPES
,
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 com.lowagie.text.Document document
pdfContentByte
protected com.lowagie.text.pdf.PdfContentByte pdfContentByte
imageTesterDocument
protected com.lowagie.text.Document imageTesterDocument
imageTesterPdfContentByte
protected com.lowagie.text.pdf.PdfContentByte imageTesterPdfContentByte
progressMonitor
protected JRExportProgressMonitor progressMonitor
reportIndex
protected int reportIndex
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
loadedImagesMap
protected java.util.Map loadedImagesMap
pxImage
protected com.lowagie.text.Image pxImage
hyperlinkProducerFactory
protected JRHyperlinkProducerFactory hyperlinkProducerFactory
JRPdfExporter
public JRPdfExporter()
getPxImage
protected com.lowagie.text.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
setForceSvgShapes
protected void setForceSvgShapes()
setSplitCharacter
protected void setSplitCharacter()
setHyperlinkProducerFactory
protected void setHyperlinkProducerFactory()
exportReportToStream
protected void exportReportToStream(java.io.OutputStream os)
throws JRException
- Throws:
JRException
exportPage
protected void exportPage(JRPrintPage page)
throws JRException,
com.lowagie.text.DocumentException,
java.io.IOException
- Throws:
JRException
com.lowagie.text.DocumentException
java.io.IOException
exportElements
protected void exportElements(java.util.Collection elements)
throws com.lowagie.text.DocumentException,
java.io.IOException,
JRException
- Throws:
com.lowagie.text.DocumentException
java.io.IOException
JRException
exportLine
protected void exportLine(JRPrintLine line)
exportRectangle
protected void exportRectangle(JRPrintRectangle rectangle)
prepareGraphicElement
protected float prepareGraphicElement(JRPrintGraphicElement element)
exportEllipse
protected void exportEllipse(JRPrintEllipse ellipse)
exportImage
protected void exportImage(JRPrintImage printImage)
throws com.lowagie.text.DocumentException,
java.io.IOException,
JRException
- Throws:
com.lowagie.text.DocumentException
java.io.IOException
JRException
setHyperlinkInfo
protected void setHyperlinkInfo(com.lowagie.text.Chunk chunk,
JRPrintHyperlink link)
getPhrase
protected com.lowagie.text.Phrase getPhrase(JRStyledText styledText,
JRPrintText textElement)
getChunk
protected com.lowagie.text.Chunk getChunk(java.util.Map attributes,
java.lang.String text)
getFont
protected com.lowagie.text.Font getFont(java.util.Map attributes)
exportText
protected void exportText(JRPrintText text)
throws com.lowagie.text.DocumentException
- Throws:
com.lowagie.text.DocumentException
exportBox
protected void exportBox(JRBox box,
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(com.lowagie.text.Chunk chunk,
JRPrintAnchor anchor,
JRPrintElement element)
exportFrame
protected void exportFrame(JRPrintFrame frame)
throws com.lowagie.text.DocumentException,
java.io.IOException,
JRException
- Throws:
com.lowagie.text.DocumentException
java.io.IOException
JRException
© 2001-2006 JasperSoft Corporation www.jaspersoft.com