Class DocumentPrintNode


  • public class DocumentPrintNode
    extends Node
    This Node is used to print out documents via the Java™ Print Service API.

    As the functionality of this node is based on the jadice document platform only those type of documents are supported that the jadice document platform can load. In any other case the action specified via setUnhandledFormatAction(UnhandledFormatAction) and an event with MessageID JS.DOCP-UNKNOWN_DOCUMENT_FORMAT will be fired.

    As this node is a data sink it must not have a successor.

    Its worker respects PageCountLimits.

    Since:
    jadice server 4.3.1.4
    • Constructor Detail

      • DocumentPrintNode

        public DocumentPrintNode()
    • Method Detail

      • setPrintServiceName

        public void setPrintServiceName​(String printServiceName)
        Set the name of the printer service that the server will use, i.e. printer name. This service must be available on the server side. Otherwise the job will fail. Default value: null, uses the default print service
        Parameters:
        printServiceName - name of the print service to use
        See Also:
        PrintServiceLookup
      • getPrintServiceName

        public String getPrintServiceName()
        Returns:
        Name of the print service to use.
      • setPrintRequestAttributeSet

        public void setPrintRequestAttributeSet​(PrintRequestAttributeSet printAttributes)
        Set print request attributes, e.g. number of copies, duplex mode.

        Default value: empty set. This property must not be null.

        Parameters:
        printAttributes - attributes the print service shall use.
        See Also:
        PrintRequestAttributeSet, PrintRequestAttribute
      • getPrintRequestAttributeSet

        public PrintRequestAttributeSet getPrintRequestAttributeSet()
        Returns:
        Print request attributes the print service shall use
      • setPageFormat

        public void setPageFormat​(PageFormat pageFormat)
        Sets a PageFormat object that will be used as the media on which the printer will print. The PageFormat will be validated and if necessary corrected by printer drivers before start physical printing if the preferences indicates a validation and correction.

        As PageFormat is not Serializable, a wrapper class must be used here.

        Parameters:
        pageFormat - the PageFormat object to be set.
      • getPageFormat

        public PageFormat getPageFormat()
        Returns:
        the PageFormat that the printer will use.
      • setEnlargePageToPaper

        public void setEnlargePageToPaper​(boolean enlargePageToPaper)
        Set if the the page shall be enlarged to fit onto the paper. (Default value: false
        Parameters:
        enlargePageToPaper - pages will be enlarged to page size iff true
      • isEnlargePageToPaper

        public boolean isEnlargePageToPaper()
        Returns:
        whether or not to enlarge pages to fit onto the paper.
      • setShrinkPageToPaper

        public void setShrinkPageToPaper​(boolean shrinkPageToPaper)
        Set if the the page shall be shrinked to fit onto the paper completely. (Default value: true
        Parameters:
        shrinkPageToPaper - pages will be shrinked to page size iff true
      • isShrinkPageToPaper

        public boolean isShrinkPageToPaper()
        Returns:
        whether or not to shrink pages to fit onto the paper.
      • setOptimizeRotation

        public void setOptimizeRotation​(boolean optimizeRotation)
        If this flag is set the rotation of the pages will be optimized. Optimization means that landscape pages will be rotated to that the fit better onto portrait pages and vice versa.
        Parameters:
        optimizeRotation - pages can be rotated iff set to true
      • isOptimizeRotation

        public boolean isOptimizeRotation()
        Returns:
        whether or not pages can be rotated.
      • 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.
      • getOutputCardinality

        public Node.Cardinality getOutputCardinality()
        Description copied from class: Node
        Return the output cardinality of this node, i.e. how many bundles (not streams!) it expects to produce. By default, nodes are "pipe-style", i.e. one input, one output.
        Overrides:
        getOutputCardinality in class Node
        Returns:
        output cardinality