Class HTMLRendererNode


  • 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 PageCountLimits.

    • Constructor Detail

      • HTMLRendererNode

        public HTMLRendererNode()
    • Method Detail

      • getWorkerClassName

        public String getWorkerClassName()
        Description copied from class: Node
        Return the node's associated com.levigo.jadice.server.core.NodeWorker full qualified class's name. By default, the worker class name is
        • The same as the node name with the trailing "Node" replaced by "Worker" if the node name ends in "Node"
        • The node class name with an appended "Worker" otherwise.
        The package name of the worker class is the name of the Node's package with an appended ".worker".

        This behavior can be overridden in concrete subclasses.

        Overrides:
        getWorkerClassName in class Node
        Returns:
        the full qualified class name of the worker of this node.
      • getTargetMimeType

        public String getTargetMimeType()
        Returns:
        the desired target MIME-type
      • setTargetMimeType

        public void setTargetMimeType​(String targetMimeType)
        Set the desired target MIME-type.
        Parameters:
        targetMimeType - the desired target MIME-type
      • isAllowHTTPResources

        public boolean isAllowHTTPResources()
      • setAllowHTTPResources

        public void setAllowHTTPResources​(boolean allowHTTPResources)
        Set to true if HTTP request (e.g. for images) are allowed. (default: false)
        Parameters:
        allowHTTPResources - true if resolving resources from external URLs shall be allowed. false otherwise
      • getMargin

        public Insets getMargin()
        Returns:
        The page margins to use
      • setMargin

        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

        Parameters:
        margin - The page margins to use
        Throws:
        IllegalArgumentException - If parameter is null or one of the sizes is negative.
      • isGenerateHyperlinks

        public boolean isGenerateHyperlinks()
      • setGenerateHyperlinks

        public void setGenerateHyperlinks​(boolean generate)
        Determine if the resulting PDF document shall have hyperlinks to external locations. (default: true
        Parameters:
        generate - if true hyperlinks will be embedded in the resulting PDF document
        Since:
        jadice server 5.2.3.0