org.zefer.pd4ml
Class PD4Document
java.lang.Object
PD4DocumentBase
org.zefer.pd4ml.PD4Document
public class PD4Document
- extends PD4DocumentBase
Constructor Summary |
PD4Document(byte[] bytes,
java.lang.String password)
|
PD4Document(java.io.InputStream stream,
java.lang.String password)
|
PD4Document(java.net.URL url,
java.lang.String password)
|
Method Summary |
static void |
mergePDFs(java.io.InputStream pdf1,
java.io.InputStream pdf2,
java.io.OutputStream result)
basic PDF merging method. |
protected void |
read(int objectCounter)
reads and parses given PDF document stream |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PD4Document
public PD4Document(byte[] bytes,
java.lang.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(java.io.InputStream stream,
java.lang.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(java.net.URL url,
java.lang.String password)
throws PD4InvokeException
- Parameters:
url
- PDF document URLpassword
- if any. "null" for not protected PDF documents
- Throws:
PD4InvokeException
- by invalid call parameters
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
read
protected void read(int objectCounter)
throws java.io.IOException,
PD4InvalidPasswordException
- reads and parses given PDF document stream
- Parameters:
objectCounter
- initial object number to re-index PDF objects. Used by PDF merge scenarios
- Throws:
java.io.IOException
- read/parsing errors
PD4InvalidPasswordException
Copyright © 2004-14 zefer.org. All Rights Reserved.