public class ImageRenderer extends java.lang.Object implements LayoutedPagesConsumer, java.io.Serializable
Modifier and Type | Class and Description |
---|---|
static class |
ImageRenderer.ImageFormat |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
legalCopyright |
Constructor and Description |
---|
ImageRenderer()
Creates a ImageRenderer object.
|
Modifier and Type | Method and Description |
---|---|
void |
setAntialiasFonts(java.lang.Boolean antialiasFonts)
Sets whether text is drawn using antialiasing.
|
void |
setAntialiasShapes(java.lang.Boolean antialiasShapes)
Sets whether shapes are drawn using antialiasing.
|
void |
setFileNamePrefix(java.lang.String fileNamePrefix)
Sets the file name prefix of the generated image files.
|
void |
setFileType(ImageRenderer.ImageFormat fileType)
Sets the output format as determined by the
fileType
argument. |
void |
setFileType(java.lang.String fileType)
Sets the output format as determined by the
fileType
argument. |
void |
setFromPage(java.lang.Integer fromPage)
Sets the first page to be included in the document.
|
void |
setGenerationDirectoryName(java.lang.String generationDirectoryName)
Sets the name of the directory in which the files are created.
|
void |
setGrayscale(java.lang.Boolean grayscale)
Sets whether the images produced are gray scale or color bitmaps.
|
void |
setResolution(java.lang.Integer resolutionInDPI)
Sets the resolution of the images produced.
|
void |
setShrinkImageToPageContent(java.lang.Boolean shrinkImagesToPageContent)
Sets whether the images produced are cropped to the
page content (size of the page box) or have full page size.
|
void |
setToPage(java.lang.Integer toPage)
Sets the last page (inclusive) to be included in the document.
|
void |
setUsePageNamesAsFileNames(java.lang.Boolean usePageNamesAsFileNames)
Sets whether the page names ("name" attribute) in the document
should be used as file names.
|
public static final java.lang.String legalCopyright
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 setAntialiasFonts(java.lang.Boolean antialiasFonts)
true
.antialiasFonts
- whether text is drawn with antialiasingpublic void setAntialiasShapes(java.lang.Boolean antialiasShapes)
true
.antialiasShapes
- whether shapes are drawn with antialiasingpublic void setGrayscale(java.lang.Boolean grayscale)
false
.grayscale
- whether gray scale images are producedpublic void setFileType(ImageRenderer.ImageFormat fileType)
fileType
argument.fileType
- one of the following values:
Other file types may be available depending on the JVM used.
These can be selected using the method setFileType(String)
.
setFileType(String)
public void setFileType(java.lang.String fileType)
fileType
argument.fileType
- one of the following values:
ImageIOInfo
setFileType(ImageFormat)
public void setResolution(java.lang.Integer resolutionInDPI)
resolutionInDPI
- the resolution in DPIjava.lang.IllegalArgumentException
- if resolutionInDPI
is not greater
than 0
.public void setShrinkImageToPageContent(java.lang.Boolean shrinkImagesToPageContent)
false
.shrinkImagesToPageContent
- whether images are croppedpublic void setFileNamePrefix(java.lang.String fileNamePrefix)
setUsePageNamesAsFileNames(java.lang.Boolean)
.
The default value is "img"
.fileNamePrefix
- the file name prefix of the generated image files.setUsePageNamesAsFileNames(java.lang.Boolean)
public void setGenerationDirectoryName(java.lang.String generationDirectoryName)
generationDirectoryName
- the name of the file creation directorypublic void setUsePageNamesAsFileNames(java.lang.Boolean usePageNamesAsFileNames)
setFileNamePrefix(java.lang.String)
is used.
The default value is false
.usePageNamesAsFileNames
- whether document page names should
be used as file names