Class PSDocument

    • Field Detail

      • serialVersionUID

        private static final long serialVersionUID
        Serial version UID.
        See Also:
        Constant Field Values
    • Constructor Detail

      • PSDocument

        public PSDocument()
    • Method Detail

      • load

        public void load​(java.io.InputStream inputStream)
                  throws java.io.IOException
        Description copied from interface: Document
        Load document from an InputStream.
        Specified by:
        load in interface Document
        Overrides:
        load in class AbstractDocument
        Throws:
        java.io.IOException
      • extract

        public Document extract​(int begin,
                                int end)
                         throws DocumentException
        Description copied from interface: Document
        Return a new document containing pages of a given range. Note : begin and end indicies start at 1
        Parameters:
        begin - Index of the first page to extract
        end - Index of the last page to extract
        Returns:
        A new document.
        Throws:
        DocumentException
      • append

        public void append​(Document document)
                    throws DocumentException
        This methods appends pages the DSC way (only by relying on the structure). It does not work with documents generated by different softwares / spools. It is intended to be used only for rearranging pages of the same document. If you need to append a different document, consider using the SafeAppenderModifier instead.
        Specified by:
        append in interface Document
        Overrides:
        append in class AbstractDocument
        Parameters:
        document - Document ot append
        Throws:
        DocumentException
        See Also:
        SafeAppenderModifier
      • getType

        public java.lang.String getType()
        Description copied from interface: Document
        Return the type of the document.
        Returns:
        A String representing the document type name.