public class HTMLRenderer extends FormatProducer implements LayoutedPagesConsumer, java.io.Serializable
PDFRenderer
, SVGRenderer
, PostscriptRenderer
, Printer
or ImageRenderer
.
setRemoveBackgroundImages(Boolean)
.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
legalCopyright |
Modifier | Constructor and Description |
---|---|
protected |
HTMLRenderer()
Creates a HTMLRenderer object.
|
|
HTMLRenderer(FormatHandler handler)
Creates a HTMLRenderer object that outputs to the given
handler object.
|
Modifier and Type | Method and Description |
---|---|
void |
setEmbedImages(java.lang.Boolean embedImages)
Activates image embedding if true, external image file
referencing if false.
|
void |
setFromPage(java.lang.Integer fromPage)
Sets the first page to be included in the document.
|
void |
setIgnoreColumnAlignment(java.lang.Boolean ignoreColumnAlignment)
Sets whether the column alignment of items can be ignored
allowing a more compact representation.
|
void |
setIgnoreRowAlignment(java.lang.Boolean ignoreRowAlignment)
Sets whether the row alignment of items can be ignored
allowing a more compact representation.
|
void |
setImageGenerationDirectory(java.lang.String imageGenerationDirectory)
Sets the directory where images files are to be created
when image embedding has been unselected.
|
void |
setImageURLPrefix(java.lang.String imageURLPrefix)
Sets the prefix for generated URLs that reference
external images when image embedding has been unselected.
|
void |
setRemoveBackgroundImages(java.lang.Boolean removeBackgroundImages)
Activates background image removal if true, partially obscured images
are preserved if false.
|
void |
setRemoveWhitespace(java.lang.Boolean removeWhitespace)
Activates whitespace removal if true, columns or rows containing
whitespace only are preserved if false.
|
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 HTMLRenderer()
public HTMLRenderer(FormatHandler handler)
handler
- A FormatHandlerpublic 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 setEmbedImages(java.lang.Boolean embedImages)
true
.embedImages
- whether images are embedded in the
document or external files are usedpublic void setImageGenerationDirectory(java.lang.String imageGenerationDirectory)
The directory needs to exist.
By default the images are generated in the same directory as the HTML document.
The specified directory has no impact on the URL generated to reference the image.
imageGenerationDirectory
- the directory in which the image
files will be placed.setEmbedImages(java.lang.Boolean)
,
setImageURLPrefix(java.lang.String)
public void setImageURLPrefix(java.lang.String imageURLPrefix)
The default value is the empty string
Generated URLs are constructed by concatenation of of the prefix with the image file name. If for example the image file name is "1234.jpg" then the default url will be "1234.jpg" and a prefix of "images/" will result in "images/1234.jpg"
imageURLPrefix
- a URL prefixsetEmbedImages(java.lang.Boolean)
,
setImageGenerationDirectory(java.lang.String)
public void setRemoveWhitespace(java.lang.Boolean removeWhitespace)
false
.removeWhitespace
- whether columns or rows containing whitespace
only are removed.public void setIgnoreRowAlignment(java.lang.Boolean ignoreRowAlignment)
false
.
When set, only those objects that are entirely above or entirely below each other will go in separate rows. The option reduces the amount of rows thereby loosing the horizontal alignment. The topology is not changed so that visually stacked items remain stacked.
ignoreRowAlignment
- whether row alignment can be ignored.public void setIgnoreColumnAlignment(java.lang.Boolean ignoreColumnAlignment)
false
.
When set, only those objects that are entirely to the left or entirely to the right each other will go in separate columns. The option reduces the amount of columns thereby loosing the vertical alignment. The topology is not changed so that visually adjacent items remain adjacent.
ignoreColumnAlignment
- whether column alignment can be ignored.public void setRemoveBackgroundImages(java.lang.Boolean removeBackgroundImages)
false
.removeBackgroundImages
- whether partially obscured images are
removed.