Save This Page
Home » jasperreports-3.0.0-project » net.sf.jasperreports.engine.export » [javadoc | source]
net.sf.jasperreports.engine.export
public class: JRPdfExporter [javadoc | source]
java.lang.Object
   net.sf.jasperreports.engine.JRAbstractExporter
      net.sf.jasperreports.engine.export.JRPdfExporter

All Implemented Interfaces:
    JRExporter

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.

Nested Class Summary:
protected static class  JRPdfExporter.Bookmark   
protected static class  JRPdfExporter.BookmarkStack   
public static class  JRPdfExporter.NullOutputStream  Output stream implementation that discards all the data. 
class  JRPdfExporter.LocalFontMapper   
Field Summary
public static final  String PDF_FORCE_SVG_SHAPES   
     
    protected static final  String JR_PAGE_ANCHOR_PREFIX     
    protected static  boolean fontsRegistered     
    protected  Document document     
    protected  PdfContentByte pdfContentByte     
    protected  PdfWriter pdfWriter     
    protected  Document imageTesterDocument     
    protected  PdfContentByte imageTesterPdfContentByte     
    protected  JRExportProgressMonitor progressMonitor     
    protected  int reportIndex     
    protected  boolean forceSvgShapes     
    protected  boolean isCreatingBatchModeBookmarks     
    protected  boolean isCompressed     
    protected  boolean isEncrypted     
    protected  boolean is128BitKey     
    protected  String userPassword     
    protected  String ownerPassword     
    protected  int permissions     
    protected  Character pdfVersion     
    protected  String pdfJavaScript     
    protected  Map loadedImagesMap     
    protected  Image pxImage     
    protected  JRHyperlinkProducerFactory hyperlinkProducerFactory     
    Fields inherited from net.sf.jasperreports.engine.JRAbstractExporter:
    PROPERTY_CELL_FORMULA,  parameters,  jasperPrintList,  jasperPrint,  isModeBatch,  startPageIndex,  endPageIndex,  globalOffsetX,  globalOffsetY,  classLoader,  classLoaderSet,  urlHandlerFactory,  urlHandlerFactorySet,  fileResolver,  fileResolverSet,  filter,  dateFormatCache,  numberFormatCache
    Method from net.sf.jasperreports.engine.export.JRPdfExporter Summary:
    addBookmark,   exportBottomPen,   exportBox,   exportElements,   exportEllipse,   exportFrame,   exportImage,   exportLeftPen,   exportLine,   exportPage,   exportPen,   exportRectangle,   exportReport,   exportReportToStream,   exportRightPen,   exportText,   exportTopPen,   getChunk,   getDefaultPdfFontAttributes,   getFont,   getPhrase,   getPxImage,   initBookmarks,   registerFonts,   setAnchor,   setHyperlinkInfo,   setHyperlinkProducerFactory,   setSplitCharacter,   writePageAnchor
    Methods from net.sf.jasperreports.engine.JRAbstractExporter:
    defaultParseNumber,   exportReport,   getBooleanCellValue,   getBooleanParameter,   getDateCellValue,   getDateFormat,   getIntegerParameter,   getNumberCellValue,   getNumberFormat,   getOffsetX,   getOffsetY,   getParameter,   getParameterResolver,   getParameters,   getStringParameter,   getStringParameterOrDefault,   getStyledText,   getStyledText,   getTextFormatFactoryClass,   getTextLocale,   getTextTimeZone,   getTextValue,   getTextValueString,   reset,   resetClassLoader,   resetExportContext,   restoreElementOffsets,   setClassLoader,   setExportContext,   setFrameElementsOffset,   setInput,   setOffset,   setOffset,   setOutput,   setPageRange,   setParameter,   setParameters
    Methods from java.lang.Object:
    equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
    Method from net.sf.jasperreports.engine.export.JRPdfExporter Detail:
     protected  void addBookmark(int level,
        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(Collection elements) throws IOException, DocumentException, JRException 
     protected  void exportEllipse(JRPrintEllipse ellipse) 
     protected  void exportFrame(JRPrintFrame frame) throws IOException, DocumentException, JRException 
     protected  void exportImage(JRPrintImage printImage) throws IOException, DocumentException, JRException 
     protected  void exportLeftPen(JRPen topPen,
        JRPen leftPen,
        JRPen bottomPen,
        JRPrintElement element) 
     protected  void exportLine(JRPrintLine line) 
     protected  void exportPage(JRPrintPage page) throws IOException, DocumentException, JRException 
     protected  void exportPen(JRPen pen,
        JRPrintElement element) 
     protected  void exportRectangle(JRPrintRectangle rectangle) 
     public  void exportReport() throws JRException 
     protected  void exportReportToStream(OutputStream os) throws JRException 
     protected  void exportRightPen(JRPen topPen,
        JRPen bottomPen,
        JRPen rightPen,
        JRPrintElement element) 
     protected  void exportText(JRPrintText text) throws DocumentException 
     protected  void exportTopPen(JRPen topPen,
        JRPen leftPen,
        JRPen rightPen,
        JRPrintElement element) 
     protected Chunk getChunk(Map attributes,
        String text) 
     protected Map getDefaultPdfFontAttributes() 
     protected Font getFont(Map attributes) 
     protected Phrase getPhrase(JRStyledText styledText,
        JRPrintText textElement) 
     protected Image getPxImage() 
     protected  void initBookmarks() 
     protected static synchronized  void registerFonts() 
     protected  void setAnchor(Chunk chunk,
        JRPrintAnchor anchor,
        JRPrintElement element) 
     protected  void setHyperlinkInfo(Chunk chunk,
        JRPrintHyperlink link) 
     protected  void setHyperlinkProducerFactory() 
     protected  void setSplitCharacter() 
     protected  void writePageAnchor(int pageIndex) throws DocumentException