public class HTMLRendererNode extends Node
This node renders HTML pages into other formats. The only target format currently supported is 'application/pdf', though. This functionality is currently backed by the cobra toolkit, but the backing implementation may change in the future.
Its worker respects PageCountLimit
s.
Modifier and Type | Class and Description |
---|---|
static class |
HTMLRendererNode.PageSize
Predefined values for the size of the resulting PDF document
|
Node.Cardinality
Constructor and Description |
---|
HTMLRendererNode() |
Modifier and Type | Method and Description |
---|---|
Insets |
getMargin() |
HTMLRendererNode.PageSize |
getPageSize() |
String |
getTargetMimeType() |
String |
getWorkerClassName()
Return the node's associated
NodeWorker full qualified class's
name. |
boolean |
isAllowHTTPResources() |
boolean |
isGenerateHyperlinks() |
void |
setAllowHTTPResources(boolean allowHTTPResources)
Set to
true if HTTP request (e.g. |
void |
setGenerateHyperlinks(boolean generate)
Determine if the resulting PDF document shall have hyperlinks to external locations.
|
void |
setMargin(Insets margin)
Set the page margin of the resulting document.
|
void |
setPageSize(HTMLRendererNode.PageSize pageSize)
Set the desired
HTMLRendererNode.PageSize for the resulting PDF document. |
void |
setTargetMimeType(String targetMimeType)
Set the desired target MIME-type.
|
addTransportReceiver, appendSuccessor, apply, equals, getInputCardinality, getJob, getOutputCardinality, getPredecessors, getSubsidiaryNodes, getSuccessors, getTransportSender, getUUID, hashCode, initialize, prependPredecessor, remove, validateConfiguration
public String getWorkerClassName()
Node
Return the node's associated
NodeWorker
full qualified class's
name. By default, the worker class name is
This behavior can be overridden in concrete subclasses.
getWorkerClassName
in class Node
public String getTargetMimeType()
public void setTargetMimeType(String targetMimeType)
targetMimeType
- public boolean isAllowHTTPResources()
public void setAllowHTTPResources(boolean allowHTTPResources)
true
if HTTP request (e.g. for images) are allowed. (default: false
)allowHTTPResources
- public Insets getMargin()
public void setMargin(Insets margin)
Set the page margin of the resulting document.
The margin is measured in user space units (see ISO-32000-1). In short: 1 inch = 2.54 cm = 72 user units
Default value is: 43 user unit (about 15 mm) on each side
margin
- The page margins to useIllegalArgumentException
- If parameter is null or one of the sizes is negative.public HTMLRendererNode.PageSize getPageSize()
public void setPageSize(HTMLRendererNode.PageSize pageSize)
Set the desired HTMLRendererNode.PageSize
for the resulting PDF document.
Default value: DIN A4 (HTMLRendererNode.PageSize.A4
)
pageSize
- the desired page sizepublic boolean isGenerateHyperlinks()
public void setGenerateHyperlinks(boolean generate)
true
generate
- if true
hyperlinks will be embedded in the resulting PDF documentCopyright © 2017 levigo holding gmbh. All rights reserved.