Class PD4Document

    • Constructor Detail

      • PD4Document

        public PD4Document​(byte[] bytes,
                           String password)
                    throws PD4InvokeException
        Parameters:
        bytes - PDF document as an array of bytes
        password - if any. "null" for not protected PDF documents
        Throws:
        PD4InvokeException - by invalid call parameters
      • PD4Document

        public PD4Document​(URL url,
                           String password)
                    throws PD4InvokeException
        Parameters:
        url - PDF document URL
        password - if any. "null" for not protected PDF documents
        Throws:
        PD4InvokeException - by invalid call parameters
    • Method Detail

      • mergePDFs

        public static void mergePDFs​(InputStream pdf1,
                                     InputStream pdf2,
                                     OutputStream result)
                              throws IOException
        basic PDF merging method. Appends pdf2 to pdf1 bytes and writes resulting PDF to result.
        Parameters:
        pdf1 - main PDF document bytes stream
        pdf2 - PDF document bytes to append
        result - output stream to write resulting PDF
        Throws:
        IOException - reflects a variety of PDF read/parse/write errors