Example usage for Java org.apache.pdfbox.pdmodel PDDocument fields, constructors, methods, implement or subclass
The text is from its open source code.
PDDocument() Creates an empty PDF document. | |
PDDocument(MemoryUsageSetting memUsageSetting) Creates an empty PDF document. | |
PDDocument(COSDocument doc) Constructor that uses an existing document. |
void | addPage(PDPage page) This will add a page to the document. |
void | addSignature(PDSignature sigObject, SignatureOptions options) Add parameters of signature to be created externally. |
void | addSignature(PDSignature sigObject, SignatureInterface signatureInterface) Add a signature to be created using the instance of given interface. |
void | addSignature(PDSignature sigObject, SignatureInterface signatureInterface, SignatureOptions options) This will add a signature to the document. |
void | addSignature(PDSignature sigObject) Add parameters of signature to be created externally using default signature options. |
void | close() This will close the underlying COSDocument object. |
AccessPermission | getCurrentAccessPermission() Returns the access permissions granted when the document was decrypted. |
COSDocument | getDocument() This will get the low level document. |
PDDocumentCatalog | getDocumentCatalog() This will get the document CATALOG. |
Long | getDocumentId() Provides the document ID. |
PDDocumentInformation | getDocumentInformation() This will get the document info dictionary. |
int | getNumberOfPages() This will return the total page count of the PDF document. |
PDPage | getPage(int pageIndex) Returns the page at the given 0-based index. |
PDPageTree | getPages() Returns the page tree. |
List | getSignatureDictionaries() Retrieve all signature dictionaries from the document. |
List | getSignatureFields() Retrieve all signature fields from the document. |
float | getVersion() Returns the PDF specification version this document conforms to. |
PDPage | importPage(PDPage page) This will import and copy the contents from another location. |
boolean | isAllSecurityToBeRemoved() Indicates if all security is removed or not when writing the pdf. |
boolean | isEncrypted() This will tell if this document is encrypted or not. |
PDDocument | load(File file) Parses a PDF. |
PDDocument | load(InputStream input) Parses a PDF. |
PDDocument | load(byte[] input) Parses a PDF. |
PDDocument | load(File file, MemoryUsageSetting memUsageSetting) Parses a PDF. |
PDDocument | load(File file, String password) Parses a PDF. |
PDDocument | load(InputStream input, MemoryUsageSetting memUsageSetting) Parses a PDF. |
PDDocument | load(InputStream input, String password) Parses a PDF. |
PDDocument | load(byte[] input, String password) Parses a PDF. |
PDDocument | load(File file, String password, InputStream keyStore, String alias) Parses a PDF. |
PDDocument | load(InputStream input, String password, InputStream keyStore, String alias) Parses a PDF. |
PDDocument | load(byte[] input, String password, InputStream keyStore, String alias) Parses a PDF. |
PDDocument | load(File file, String password, MemoryUsageSetting memUsageSetting) Parses a PDF. |
PDDocument | load(InputStream input, String password, MemoryUsageSetting memUsageSetting) Parses a PDF. |
void | protect(ProtectionPolicy policy) Protects the document with a protection policy. |
void | removePage(PDPage page) Remove the page from the document. |
void | removePage(int pageNumber) Remove the page from the document. |
void | save(String fileName) Save the document to a file. |
void | save(File file) Save the document to a file. |
void | save(OutputStream output) This will save the document to an output stream. |
void | saveIncremental(OutputStream output) Save the PDF as an incremental update. |
ExternalSigningSupport | saveIncrementalForExternalSigning(OutputStream output) Save PDF incrementally without closing for external signature creation scenario. |
void | setAllSecurityToBeRemoved(boolean removeAllSecurity) Activates/Deactivates the removal of all security when writing the pdf. |
void | setDocumentId(Long docId) Sets the document ID to the given value. |
void | setDocumentInformation(PDDocumentInformation info) This will set the document information for this document. |
void | setResourceCache(ResourceCache resourceCache) Sets the resource cache associated with this document. |