Package net.sf.jasperreports.pdf.classic
Class ClassicPdfProducer
- java.lang.Object
-
- net.sf.jasperreports.pdf.classic.ClassicPdfProducer
-
- All Implemented Interfaces:
PdfProducer
public class ClassicPdfProducer extends Object implements PdfProducer
- Author:
- Lucian Chirita (lucianc@users.sourceforge.net)
-
-
Field Summary
Fields Modifier and Type Field Description static String
PROPERTY_DOCUMENT_LANGUAGE
The language of PDF the document, used for glyph substitution when Apache FOP is present and thePROPERTY_FOP_GLYPH_SUBSTITUTION_ENABLED
property is set.static String
PROPERTY_FOP_GLYPH_SUBSTITUTION_ENABLED
Flag that determines whether glyph substitution based on Apache FOP is enabled.
-
Constructor Summary
Constructors Constructor Description ClassicPdfProducer(PdfProducerContext context)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description PdfImage
clipImage(PdfImage image, int clipWidth, int clipHeight, int translateX, int translateY)
void
close()
PdfRadioCheck
createCheckField(float llx, float lly, float urx, float ury, String fieldName, String onValue)
PdfTextChunk
createChunk(String text, Map<AttributedCharacterIterator.Attribute,Object> attributes, Locale locale)
PdfChunk
createChunk(PdfImage imageContainer)
PdfTextField
createComboField(float llx, float lly, float urx, float ury, String fieldName, String value, String[] choices)
PdfDocument
createDocument(PrintPageFormat pageFormat)
PdfImage
createImage(byte[] data, boolean verify)
PdfTextField
createListField(float llx, float lly, float urx, float ury, String fieldName, String value, String[] choices)
PdfContent
createPdfContent()
PdfPhrase
createPhrase()
PdfPhrase
createPhrase(PdfChunk chunk)
PdfTextField
createTextField(float llx, float lly, float urx, float ury, String fieldName)
protected com.lowagie.text.pdf.TextField
createTextFormField(float llx, float lly, float urx, float ury, String fieldName)
PdfDocumentWriter
createWriter(OutputStream os)
PdfImage
drawImage(JRPrintImage image, Graphics2DRenderable renderer, boolean forceSvgShapes, double renderWidth, double renderHeight)
void
endPage()
PdfProducerContext
getContext()
com.lowagie.text.Font
getFont(Map<AttributedCharacterIterator.Attribute,Object> attributes, Locale locale)
PdfContent
getPdfContent()
com.lowagie.text.pdf.PdfContentByte
getPdfContentByte()
PdfStructure
getPdfStructure()
com.lowagie.text.pdf.PdfWriter
getPdfWriter()
PdfRadioCheck
getRadioField(float llx, float lly, float urx, float ury, String fieldName, String onValue)
protected com.lowagie.text.pdf.PdfFormField
getRadioGroup(com.lowagie.text.pdf.RadioCheckField radioCheckField)
PdfOutlineEntry
getRootOutline()
AbstractPdfTextRenderer
getTextRenderer(JRPrintText text, JRStyledText styledText, Locale textLocale, boolean awtIgnoreMissingFont, boolean defaultIndentFirstLine, boolean defaultJustifyLastLine)
Deprecated.Replaced bygetTextRenderer(PdfTextRendererContext)
.AbstractPdfTextRenderer
getTextRenderer(PdfTextRendererContext textContext)
void
initReport()
void
newPage()
protected void
setDocumentProperties(com.lowagie.text.Document pdfDocument)
protected void
setFieldChoices(com.lowagie.text.pdf.TextField textField, String value, String[] choices)
void
setForceLineBreakPolicy(boolean forceLineBreakPolicy)
void
setPageSize(PrintPageFormat pageFormat, int pageWidth, int pageHeight)
void
setTagged()
-
-
-
Field Detail
-
PROPERTY_FOP_GLYPH_SUBSTITUTION_ENABLED
public static final String PROPERTY_FOP_GLYPH_SUBSTITUTION_ENABLED
Flag that determines whether glyph substitution based on Apache FOP is enabled.
-
PROPERTY_DOCUMENT_LANGUAGE
public static final String PROPERTY_DOCUMENT_LANGUAGE
The language of PDF the document, used for glyph substitution when Apache FOP is present and thePROPERTY_FOP_GLYPH_SUBSTITUTION_ENABLED
property is set.
-
-
Constructor Detail
-
ClassicPdfProducer
public ClassicPdfProducer(PdfProducerContext context)
-
-
Method Detail
-
getContext
public PdfProducerContext getContext()
- Specified by:
getContext
in interfacePdfProducer
-
createDocument
public PdfDocument createDocument(PrintPageFormat pageFormat)
- Specified by:
createDocument
in interfacePdfProducer
-
setDocumentProperties
protected void setDocumentProperties(com.lowagie.text.Document pdfDocument)
-
createWriter
public PdfDocumentWriter createWriter(OutputStream os) throws JRException
- Specified by:
createWriter
in interfacePdfProducer
- Throws:
JRException
-
getPdfWriter
public com.lowagie.text.pdf.PdfWriter getPdfWriter()
-
setTagged
public void setTagged()
- Specified by:
setTagged
in interfacePdfProducer
-
createPdfContent
public PdfContent createPdfContent()
- Specified by:
createPdfContent
in interfacePdfProducer
-
getPdfContent
public PdfContent getPdfContent()
- Specified by:
getPdfContent
in interfacePdfProducer
-
getPdfContentByte
public com.lowagie.text.pdf.PdfContentByte getPdfContentByte()
-
initReport
public void initReport()
- Specified by:
initReport
in interfacePdfProducer
-
setForceLineBreakPolicy
public void setForceLineBreakPolicy(boolean forceLineBreakPolicy)
- Specified by:
setForceLineBreakPolicy
in interfacePdfProducer
-
newPage
public void newPage()
- Specified by:
newPage
in interfacePdfProducer
-
setPageSize
public void setPageSize(PrintPageFormat pageFormat, int pageWidth, int pageHeight)
- Specified by:
setPageSize
in interfacePdfProducer
-
endPage
public void endPage()
- Specified by:
endPage
in interfacePdfProducer
-
close
public void close()
- Specified by:
close
in interfacePdfProducer
-
getTextRenderer
public AbstractPdfTextRenderer getTextRenderer(PdfTextRendererContext textContext)
- Specified by:
getTextRenderer
in interfacePdfProducer
-
getTextRenderer
public AbstractPdfTextRenderer getTextRenderer(JRPrintText text, JRStyledText styledText, Locale textLocale, boolean awtIgnoreMissingFont, boolean defaultIndentFirstLine, boolean defaultJustifyLastLine)
Deprecated.Replaced bygetTextRenderer(PdfTextRendererContext)
.- Specified by:
getTextRenderer
in interfacePdfProducer
-
createImage
public PdfImage createImage(byte[] data, boolean verify) throws IOException, JRException
- Specified by:
createImage
in interfacePdfProducer
- Throws:
IOException
JRException
-
drawImage
public PdfImage drawImage(JRPrintImage image, Graphics2DRenderable renderer, boolean forceSvgShapes, double renderWidth, double renderHeight) throws JRException, IOException
- Specified by:
drawImage
in interfacePdfProducer
- Throws:
JRException
IOException
-
clipImage
public PdfImage clipImage(PdfImage image, int clipWidth, int clipHeight, int translateX, int translateY) throws JRException
- Specified by:
clipImage
in interfacePdfProducer
- Throws:
JRException
-
getFont
public com.lowagie.text.Font getFont(Map<AttributedCharacterIterator.Attribute,Object> attributes, Locale locale)
-
createChunk
public PdfTextChunk createChunk(String text, Map<AttributedCharacterIterator.Attribute,Object> attributes, Locale locale)
- Specified by:
createChunk
in interfacePdfProducer
-
createChunk
public PdfChunk createChunk(PdfImage imageContainer)
- Specified by:
createChunk
in interfacePdfProducer
-
createPhrase
public PdfPhrase createPhrase()
- Specified by:
createPhrase
in interfacePdfProducer
-
createPhrase
public PdfPhrase createPhrase(PdfChunk chunk)
- Specified by:
createPhrase
in interfacePdfProducer
-
createTextField
public PdfTextField createTextField(float llx, float lly, float urx, float ury, String fieldName)
- Specified by:
createTextField
in interfacePdfProducer
-
createTextFormField
protected com.lowagie.text.pdf.TextField createTextFormField(float llx, float lly, float urx, float ury, String fieldName)
-
createComboField
public PdfTextField createComboField(float llx, float lly, float urx, float ury, String fieldName, String value, String[] choices)
- Specified by:
createComboField
in interfacePdfProducer
-
setFieldChoices
protected void setFieldChoices(com.lowagie.text.pdf.TextField textField, String value, String[] choices)
-
createListField
public PdfTextField createListField(float llx, float lly, float urx, float ury, String fieldName, String value, String[] choices)
- Specified by:
createListField
in interfacePdfProducer
-
createCheckField
public PdfRadioCheck createCheckField(float llx, float lly, float urx, float ury, String fieldName, String onValue)
- Specified by:
createCheckField
in interfacePdfProducer
-
getRadioField
public PdfRadioCheck getRadioField(float llx, float lly, float urx, float ury, String fieldName, String onValue)
- Specified by:
getRadioField
in interfacePdfProducer
-
getRadioGroup
protected com.lowagie.text.pdf.PdfFormField getRadioGroup(com.lowagie.text.pdf.RadioCheckField radioCheckField)
-
getRootOutline
public PdfOutlineEntry getRootOutline()
- Specified by:
getRootOutline
in interfacePdfProducer
-
getPdfStructure
public PdfStructure getPdfStructure()
- Specified by:
getPdfStructure
in interfacePdfProducer
-
-