|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.jrefinery.report.targets.pageable.output.AbstractOutputTarget | +--com.jrefinery.report.targets.pageable.output.PDFOutputTarget
An output target for the report engine that generates a PDF file using the iText class library
(see http://www.lowagie.com/iText
, note that the URL is case-sensitive!).
If the system property "com.jrefinery.report.targets.pageable.output.PDFOutputTarget.AUTOINIT" is set to "true", the PDF-FontFactory is automatically initialized when this class is loaded. Be aware that embedding many fonts will result in larger files.
When using Unicode characters, you will have to adjust the encoding of this target to "Identity-H", to enable horizontal unicode printing. This will result in larger files.
The Encoding property is now a string with one of the values of "none" "40bit" or "128bit".
Field Summary | |
static java.lang.String |
CONFIGURATION_PREFIX
The configuration prefix. |
static java.lang.String |
EMBED_FONTS
Literal text for the 'EmbedFonts' property name. |
static java.lang.String |
ENCODING
The encoding key. |
static java.lang.String |
SECURITY_ALLOW_ASSEMBLY
Literal text for the 'AllowAssembly' property name. |
static java.lang.String |
SECURITY_ALLOW_COPY
Literal text for the 'AllowCopy' property name. |
static java.lang.String |
SECURITY_ALLOW_DEGRADED_PRINTING
Literal text for the 'AllowDegradedPrinting' property name. |
static java.lang.String |
SECURITY_ALLOW_FILLIN
Literal text for the 'AllowFillIn' property name. |
static java.lang.String |
SECURITY_ALLOW_MODIFY_ANNOTATIONS
Literal text for the 'AllowModifyAnnotations' property name. |
static java.lang.String |
SECURITY_ALLOW_MODIFY_CONTENTS
Literal text for the 'AllowModifyContents' property name. |
static java.lang.String |
SECURITY_ALLOW_PRINTING
Literal text for the 'AllowPrinting' property name. |
static java.lang.String |
SECURITY_ALLOW_SCREENREADERS
Literal text for the 'AllowScreenReaders' property name. |
static java.lang.String |
SECURITY_ENCRYPTION
Literal text for the 'Encryption' property name. |
static java.lang.String |
SECURITY_ENCRYPTION_128BIT
A constant for the encryption type (128 bit). |
static java.lang.String |
SECURITY_ENCRYPTION_40BIT
A constant for the encryption type (40 bit). |
static java.lang.String |
SECURITY_ENCRYPTION_NONE
A constant for the encryption type (40 bit). |
static java.lang.String |
SECURITY_OWNERPASSWORD
Literal text for the 'ownerpassword' property name. |
static java.lang.String |
SECURITY_USERPASSWORD
Literal text for the 'userpassword' property name. |
Fields inherited from interface com.jrefinery.report.targets.pageable.OutputTarget |
AUTHOR, TITLE |
Constructor Summary | |
PDFOutputTarget(java.io.OutputStream out,
LogicalPage logPage,
boolean embedFonts)
Creates a new PDFOutputTarget. |
|
PDFOutputTarget(java.io.OutputStream out,
java.awt.print.PageFormat pageFormat,
boolean embedFonts)
Constructs a PDFOutputTarget. |
|
PDFOutputTarget(java.io.OutputStream out,
java.awt.print.PageFormat logPageFormat,
java.awt.print.PageFormat physPageFormat,
boolean embedFonts)
Creates a new PDFOutputTarget. |
Method Summary | |
void |
beginPage(PhysicalPage format)
Signals that a page is being started. |
void |
close()
Closes the document. |
void |
configure(ReportConfiguration config)
Configures the output target. |
OutputTarget |
createDummyWriter()
Creates an output target that mimics a real output target, but produces no output. |
SizeCalculator |
createTextSizeCalculator(FontDefinition font)
Creates a 'size calculator' for the current state of the output target. |
void |
drawDrawable(DrawableContainer drawable)
Draws a drawable relative to the current position. |
void |
drawImage(ImageReference imageRef)
Draws an image from this ImageReference . |
void |
drawShape(java.awt.Shape shape)
Draws a shape at the specified location. |
void |
drawString(java.lang.String text)
Draws the band onto the specified graphics device. |
void |
endPage()
This method is called when the page is ended. |
void |
fillShape(java.awt.Shape shape)
Draws a shape at the specified location. |
com.lowagie.text.pdf.BaseFont |
getBaseFont()
Returns the iText BaseFont. |
FontDefinition |
getFont()
Returns the currently active AWT-Font. |
java.awt.Paint |
getPaint()
Returns the currently set paint. |
java.awt.Stroke |
getStroke()
Returns the current stroke. |
boolean |
isOpen()
Returns true if the output target is open, and false otherwise. |
void |
open()
Opens the document. |
void |
setFont(FontDefinition font)
Sets the current font. |
void |
setFontEncoding(java.lang.String encoding)
Defines the text encoding used in this output target. |
void |
setOperationBounds(java.awt.geom.Rectangle2D bounds)
Sets the operation bounds. |
void |
setPaint(java.awt.Paint paint)
Sets the paint. |
void |
setStroke(java.awt.Stroke stroke)
Defines the stroke used to draw shapes. |
Methods inherited from class com.jrefinery.report.targets.pageable.output.AbstractOutputTarget |
createContentFactory, getContentFactory, getHorizontalAlignmentBorder, getLogicalPage, getOperationBounds, getProperty, getProperty, getPropertyNames, getVerticalAlignmentBorder, setProperty |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String CONFIGURATION_PREFIX
public static final java.lang.String EMBED_FONTS
public static final java.lang.String SECURITY_ALLOW_PRINTING
public static final java.lang.String SECURITY_ALLOW_MODIFY_CONTENTS
public static final java.lang.String SECURITY_ALLOW_COPY
public static final java.lang.String SECURITY_ALLOW_MODIFY_ANNOTATIONS
public static final java.lang.String SECURITY_ALLOW_FILLIN
public static final java.lang.String SECURITY_ALLOW_SCREENREADERS
public static final java.lang.String SECURITY_ALLOW_ASSEMBLY
public static final java.lang.String SECURITY_ALLOW_DEGRADED_PRINTING
public static final java.lang.String SECURITY_ENCRYPTION
public static final java.lang.String SECURITY_ENCRYPTION_NONE
public static final java.lang.String SECURITY_ENCRYPTION_40BIT
public static final java.lang.String SECURITY_ENCRYPTION_128BIT
public static final java.lang.String SECURITY_USERPASSWORD
public static final java.lang.String SECURITY_OWNERPASSWORD
public static final java.lang.String ENCODING
Constructor Detail |
public PDFOutputTarget(java.io.OutputStream out, java.awt.print.PageFormat pageFormat, boolean embedFonts)
out
- the output stream.pageFormat
- the page format.embedFonts
- embed fonts?public PDFOutputTarget(java.io.OutputStream out, LogicalPage logPage, boolean embedFonts)
out
- the output stream.logPage
- the logical page.embedFonts
- embed the fonts?public PDFOutputTarget(java.io.OutputStream out, java.awt.print.PageFormat logPageFormat, java.awt.print.PageFormat physPageFormat, boolean embedFonts)
out
- the output stream.logPageFormat
- the logical page format.physPageFormat
- the physical page format.embedFonts
- embed the fonts?Method Detail |
public FontDefinition getFont()
public com.lowagie.text.pdf.BaseFont getBaseFont()
public void setFont(FontDefinition font) throws OutputTargetException
font
- the new font (null not permitted).
OutputTargetException
- if there was a problem setting the font for the target.public void drawImage(ImageReference imageRef) throws OutputTargetException
ImageReference
. The image is directly embedded into the
pdf file to provide the best scaling support.
imageRef
- the image reference.
OutputTargetException
- if there was a problem drawing the image to the target.public void drawShape(java.awt.Shape shape)
shape
- the shape to draw.public void fillShape(java.awt.Shape shape)
shape
- the shape to fill.public void endPage() throws OutputTargetException
OutputTargetException
- if there was a problem with the target.public void open() throws OutputTargetException
OutputTargetException
- if there is a problem with the target.public void beginPage(PhysicalPage format)
format
- the physical page.public void close()
public void drawString(java.lang.String text)
text
- The text to be printed.public void setStroke(java.awt.Stroke stroke) throws OutputTargetException
stroke
- the stroke.
OutputTargetException
- if there is a problem with the target.public java.awt.Stroke getStroke()
public void setPaint(java.awt.Paint paint) throws OutputTargetException
paint
- the paint.
OutputTargetException
- if the paint is invalid.public java.awt.Paint getPaint()
public void setFontEncoding(java.lang.String encoding)
encoding
- the font encoding.public OutputTarget createDummyWriter()
public void configure(ReportConfiguration config)
config
- the configuration.public boolean isOpen()
public SizeCalculator createTextSizeCalculator(FontDefinition font) throws OutputTargetException
font
- the font.
OutputTargetException
- if there is a problem with the output target.public void setOperationBounds(java.awt.geom.Rectangle2D bounds)
setOperationBounds
in interface OutputTarget
setOperationBounds
in class AbstractOutputTarget
bounds
- the bounds.public void drawDrawable(DrawableContainer drawable)
drawable
- the drawable to draw.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |