public class PDFRenderer extends FormatProducer implements LayoutedPagesConsumer, java.io.Serializable
FontInfoPdf
.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
legalCopyright |
Modifier | Constructor and Description |
---|---|
protected |
PDFRenderer()
Creates a PDFRenderer object.
|
|
PDFRenderer(FormatHandler handler)
Creates a PDFRenderer object that outputs to the given
handler object.
|
Modifier and Type | Method and Description |
---|---|
void |
setEncodeImagesAsJPEG(java.lang.Boolean encodeImagesAsJPEG)
Sets whether images included in the document are encoded in JPEG
format or in a more space consuming lossless format.
|
void |
setFontDirectory(java.lang.String fontDirectory)
Sets an additional search directory for font files.
|
void |
setFromPage(java.lang.Integer fromPage)
Sets the first page to be included in the document.
|
void |
setJPEGQuality(java.lang.Double quality)
Sets the compression quality to a value between
0
and 1 in case JPEG image inclusion has been selected. |
void |
setMaximumImageResolution(java.lang.Integer maximumImageResolutionInDPI)
Sets the maximum DPI of images included in the document.
|
void |
setToPage(java.lang.Integer toPage)
Sets the last page (inclusive) to be included in the document.
|
setHandler
public static final java.lang.String legalCopyright
protected PDFRenderer()
public PDFRenderer(FormatHandler handler)
handler
- A FormatHandlerpublic void setFontDirectory(java.lang.String fontDirectory)
fontDirectory
- An absolute path to a directory containing
font files.public void setFromPage(java.lang.Integer fromPage)
fromPage
- an integer greater than zero and less than or equal to
toPage.java.lang.IllegalArgumentException
- if the above condition
is violated.public void setToPage(java.lang.Integer toPage)
toPage
- an integer greater than zero and greater than or equal
to fromPage.java.lang.IllegalArgumentException
- if the above condition
is violated.public void setEncodeImagesAsJPEG(java.lang.Boolean encodeImagesAsJPEG)
false
.encodeImagesAsJPEG
- whether images are encoded in JPEG
or in a lossless formatpublic void setJPEGQuality(java.lang.Double quality)
0
and 1
in case JPEG image inclusion has been selected.
A compression quality setting of 0.0 is interpreted as "high compression is important," while a setting of 1.0 is interpreted as "high image quality is important."
quality
- a float
between 0
and
1
indicating the desired quality level.java.lang.IllegalArgumentException
- if quality
is
not between 0
and 1
, inclusive.setEncodeImagesAsJPEG(java.lang.Boolean)
public void setMaximumImageResolution(java.lang.Integer maximumImageResolutionInDPI)
maximumImageResolutionInDPI
- the maximum resolution of images included in the documentjava.lang.IllegalArgumentException
- if maximumImageResolutionInDPI
is not greater
than 0
.