public final class PdfDocument_Api extends Object
| Constructor and Description |
|---|
PdfDocument_Api() |
| Modifier and Type | Method and Description |
|---|---|
static InternalPdfDocument |
fromBytes(byte[] pdfFileBytes)
Opens an existing PDF document for editing.
|
static InternalPdfDocument |
fromBytes(byte[] pdfFileBytes,
String userPassword)
Opens an existing PDF document for editing.
|
static InternalPdfDocument |
fromBytes(byte[] pdfFileBytes,
String userPassword,
String ownerPassword)
Opens an existing PDF document for editing.
|
static InternalPdfDocument |
fromFile(String pdfFilePath)
Opens an existing PDF document for editing.
|
static InternalPdfDocument |
fromFile(String pdfFilePath,
String password)
Opens an existing PDF document for editing.
|
static InternalPdfDocument |
fromFile(String pdfFilePath,
String password,
String ownerPassword)
Opens an existing PDF document for editing.
|
static byte[] |
getBytes(InternalPdfDocument internalPdfDocument,
boolean isIncremental)
Gets the binary data for the full PDF file as a byte array.
|
static InternalPdfDocument |
getRevision(InternalPdfDocument internalPdfDocument,
int index)
Gets the binary data for the full PDF file as a byte array.
|
static void |
saveAs(byte[] pdfData,
String filePath)
Save as.
|
static void |
saveAs(InternalPdfDocument internalPdfDocument,
String filePath)
Save as.
|
static void |
saveAsRevision(InternalPdfDocument internalPdfDocument,
String filePath)
Save as.
|
public static InternalPdfDocument fromFile(String pdfFilePath) throws IOException
pdfFilePath - The PDF file path.IOException - Exception thrown if it can not be opened.public static InternalPdfDocument fromFile(String pdfFilePath, String password) throws IOException
pdfFilePath - The PDF file path.password - Optional user password if the PDF document is encrypted.IOException - Exception thrown if it can not be opened.public static InternalPdfDocument fromFile(String pdfFilePath, String password, String ownerPassword) throws IOException
pdfFilePath - The PDF file path.password - Optional user password if the PDF document is encrypted.ownerPassword - Optional password if the PDF document is protected by owner (printing, modifying restrictions etc..)IOException - Exception thrown if it can not be opened.public static InternalPdfDocument fromBytes(byte[] pdfFileBytes, String userPassword, String ownerPassword)
pdfFileBytes - The PDF file data as byte array.userPassword - Optional user password if the PDF document is encrypted.ownerPassword - Optional password if the PDF document is protected by owner (printing, modifying restrictions etc..)public static void saveAs(InternalPdfDocument internalPdfDocument, String filePath) throws IOException
internalPdfDocument - the internal pdf documentfilePath - the file pathIOException - the io exceptionpublic static void saveAsRevision(InternalPdfDocument internalPdfDocument, String filePath) throws IOException
internalPdfDocument - the internal pdf documentfilePath - the file pathIOException - the io exceptionpublic static byte[] getBytes(InternalPdfDocument internalPdfDocument, boolean isIncremental)
internalPdfDocument - the internal pdf documentisIncremental - isIncrementalpublic static InternalPdfDocument getRevision(InternalPdfDocument internalPdfDocument, int index)
internalPdfDocument - the internal pdf documentindex - revision indexpublic static void saveAs(byte[] pdfData,
String filePath)
throws IOException
pdfData - the pdf datafilePath - the file pathIOException - the io exceptionpublic static InternalPdfDocument fromBytes(byte[] pdfFileBytes, String userPassword)
pdfFileBytes - The PDF file data as byte array.userPassword - Optional user password if the PDF document is encrypted.public static InternalPdfDocument fromBytes(byte[] pdfFileBytes)
pdfFileBytes - The PDF file data as byte array.Copyright © 2022–2023 Iron Software. All rights reserved.