Package org.zefer.pd4ml
Class PD4Document
- java.lang.Object
-
- org.zefer.pd4ml.npdf.PD4DocumentBase
-
- org.zefer.pd4ml.PD4Document
-
public class PD4Document extends PD4DocumentBase
-
-
Field Summary
-
Fields inherited from class org.zefer.pd4ml.npdf.PD4DocumentBase
pdf
-
-
Constructor Summary
Constructors Constructor Description PD4Document(byte[] bytes, String password)PD4Document(InputStream stream, String password)PD4Document(URL url, String password)
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidmergePDFs(InputStream pdf1, InputStream pdf2, OutputStream result)basic PDF merging method.-
Methods inherited from class org.zefer.pd4ml.npdf.PD4DocumentBase
append, computeScope, deletePage, dumpOutlines, getAuthor, getCreationDate, getCreator, getKeywords, getModDate, getNumberOfPages, getPageContent, getPdfFormatVersion, getPermissions, getProducer, getSubject, getTitle, overlay, overlay, read, setAuthor, setCreator, setKeywords, setModDate, setSubject, setTitle, underlay, underlay, write, write
-
-
-
-
Constructor Detail
-
PD4Document
public PD4Document(byte[] bytes, String password) throws PD4InvokeException- Parameters:
bytes- PDF document as an array of bytespassword- if any. "null" for not protected PDF documents- Throws:
PD4InvokeException- by invalid call parameters
-
PD4Document
public PD4Document(InputStream stream, String password) throws PD4InvokeException
- Parameters:
stream- PDF document input streampassword- 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 URLpassword- 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 streampdf2- PDF document bytes to appendresult- output stream to write resulting PDF- Throws:
IOException- reflects a variety of PDF read/parse/write errors
-
-