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,v 1.65 2005/10/07 09:27:31 teodord Exp $
- Author:
- Teodor Danciu (teodord@users.sourceforge.net)
- See Also:
FontKey
,
PdfFont
Fields inherited from class net.sf.jasperreports.engine.JRAbstractExporter |
classLoader, defaultFont, endPageIndex, globalOffsetX, globalOffsetY, isModeBatch, jasperPrint, jasperPrintList, parameters, startPageIndex, styledTextParser |
Methods inherited from class net.sf.jasperreports.engine.JRAbstractExporter |
getDefaultFont, getParameter, getParameters, getStyledText, resetClassLoader, setClassLoader, setInput, setOffset, setOutput, setPageRange, setParameter, setParameters |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
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
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
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
exportLine
protected void exportLine(JRPrintLine line)
exportRectangle
protected void exportRectangle(JRPrintRectangle rectangle)
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,
JRPrintText text)
getPhrase
protected com.lowagie.text.Phrase getPhrase(JRStyledText styledText,
JRPrintText textElement)
throws JRException,
com.lowagie.text.DocumentException,
java.io.IOException
- Throws:
JRException
com.lowagie.text.DocumentException
java.io.IOException
getChunk
protected com.lowagie.text.Chunk getChunk(java.util.Map attributes,
java.lang.String text)
throws JRException,
com.lowagie.text.DocumentException,
java.io.IOException
- Throws:
JRException
com.lowagie.text.DocumentException
java.io.IOException
exportText
protected void exportText(JRPrintText text)
throws JRException,
com.lowagie.text.DocumentException,
java.io.IOException
- Throws:
JRException
com.lowagie.text.DocumentException
java.io.IOException
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)
© 2001-2005 JasperSoft Corporation www.jaspersoft.com