Package com.pd4ml
Class PdfDocument
- java.lang.Object
-
- com.pd4ml.pdf.PdfDocumentBase
-
- com.pd4ml.PdfDocument
-
public class PdfDocument extends PdfDocumentBase
-
-
Field Summary
-
Fields inherited from class com.pd4ml.pdf.PdfDocumentBase
pdf
-
-
Constructor Summary
Constructors Constructor Description PdfDocument(byte[] bytes, java.lang.String password)
PdfDocument(com.pd4ml.pdf.parser.PdfDoc writer)
PdfDocument(java.io.InputStream stream, java.lang.String password)
PdfDocument(java.net.URL url, java.lang.String password)
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
mergePDFs(java.io.InputStream pdf1, java.io.InputStream pdf2, java.io.OutputStream result)
basic PDF merging method.-
Methods inherited from class com.pd4ml.pdf.PdfDocumentBase
append, computeScope, deletePage, dumpOutlines, getAuthor, getCreationDate, getCreator, getKeywords, getMetadata, getModDate, getNumberOfPages, getPageBox, getPageContent, getPageSize, getPdfFormatVersion, getPermissions, getProducer, getSubject, getTitle, overlay, overlay, read, setAuthor, setCreator, setKeywords, setModDate, setSubject, setTitle, underlay, underlay, write, write
-
-
-
-
Constructor Detail
-
PdfDocument
public PdfDocument(byte[] bytes, java.lang.String password) throws InvokeException
- Parameters:
bytes
- PDF document as an array of bytespassword
- if any. "null" for not protected PDF documents- Throws:
InvokeException
- by invalid call parameters
-
PdfDocument
public PdfDocument(java.io.InputStream stream, java.lang.String password) throws InvokeException
- Parameters:
stream
- PDF document input streampassword
- if any. "null" for not protected PDF documents- Throws:
InvokeException
- by invalid call parameters
-
PdfDocument
public PdfDocument(java.net.URL url, java.lang.String password) throws InvokeException
- Parameters:
url
- PDF document URLpassword
- if any. "null" for not protected PDF documents- Throws:
InvokeException
- by invalid call parameters
-
PdfDocument
public PdfDocument(com.pd4ml.pdf.parser.PdfDoc writer) throws InvokeException
- Parameters:
writer
- PDF document PdfWriter object- Throws:
InvokeException
- by invalid call parameters
-
-
Method Detail
-
mergePDFs
public static void mergePDFs(java.io.InputStream pdf1, java.io.InputStream pdf2, java.io.OutputStream result) throws java.io.IOException
basic PDF merging method. Appends pdf2 to pdf1 bytes and writes resulting PDF to result.- Parameters:
pdf1
- main PDF document bytes streampdf2
- PDF document bytes to appendresult
- output stream to write resulting PDF- Throws:
java.io.IOException
- reflects a variety of PDF read/parse/write errors
-
-