Class LibreOfficeConversionNode


  • public class LibreOfficeConversionNode
    extends Node
    A node using LibreOffice for document conversion processing.

    Its worker respects PageCountLimits.

    Important Notice: In order to work the LibreOffice program folder1 must be added to jadice server's class path. For LibreOffice 4.x the file jurt.jar2 that is contained within the OOo folder must be added to the class path, too.

    1: typically C:\Programs\LibreOffice\App\libreoffice\program\ for MS Windows®
    2: typically C:\Programs\LibreOffice\App\libreofficeLibreOffice\App\libreoffice\URE\java\jurt.jar. This issue is related to the bug described in Issue 80383 in the OOo bug tracker.

    • Constructor Detail

      • LibreOfficeConversionNode

        public LibreOfficeConversionNode()
    • 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()
        Get the selected target MIME type
        Returns:
        a MIME type
      • getMaxStreamSize

        public Integer getMaxStreamSize()
      • setMaxStreamSize

        public void setMaxStreamSize​(Integer maxStreamSize)
        Set how many pages the resulting stream(s) shall contain at most. If this value is less than the number of pages the document has, this worker will split the document in several streams.

        E.g.: You have a document with 11 pages and set this value to 5. Then the worker will convert it in three portions: pages 1–5, pages 6–10 and page 11.

        This is quite useful if a remote viewing component triggers the conversion that wants the first page as quick a possible and when the following ones can be transfered subsequently.

        Note: Be aware that the total time of the conversion will be higher by a significant factor for a lower value. Implementation Notes:

        • This flag only works together with output MIME type application/pdf.
        • Calc spreadsheet / Excel tables don't have a page property, so this setting will be ignored and these documents will converted to one single stream.

        Default value: null, so that the document will be converted into one stream that contains all pages.

        Parameters:
        maxStreamSize - maximum of pages a stream of a converted document contains or null to convert all pages to one stream.
        Since:
        jadice server 4.1.1.5
      • getExportFormat

        public ExportFormat getExportFormat()
        Returns:
        the export format.
      • setExportFormat

        public void setExportFormat​(ExportFormat exportFormat)
        Set the export format.
        Parameters:
        exportFormat - the target format