Class PdfDocument_Api
java.lang.Object
com.ironsoftware.ironpdf.internal.staticapi.PdfDocument_Api
The type Pdf document api.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic InternalPdfDocumentfromBytes(byte[] pdfFileBytes) Opens an existing PDF document for editing.static InternalPdfDocumentOpens an existing PDF document for editing.static InternalPdfDocumentOpens an existing PDF document for editing.static InternalPdfDocumentOpens an existing PDF document for editing.static InternalPdfDocumentOpens an existing PDF document for editing.static InternalPdfDocumentOpens an existing PDF document for editing.static byte[]getBytes(InternalPdfDocument internalPdfDocument) Gets the binary data for the full PDF file as a byte array.static voidSave as.static voidsaveAs(InternalPdfDocument internalPdfDocument, String filePath) Save as.
- 
Constructor Details- 
PdfDocument_Apipublic PdfDocument_Api()
 
- 
- 
Method Details- 
fromFileOpens an existing PDF document for editing.- Parameters:
- pdfFilePath- The PDF file path.
- Returns:
- An IronPdf.PdfDocument object as loaded from the file path.
- Throws:
- IOException- Exception thrown if it can not be opened.
 
- 
fromFileOpens an existing PDF document for editing.- Parameters:
- pdfFilePath- The PDF file path.
- password- Optional user password if the PDF document is encrypted.
- Returns:
- An IronPdf.PdfDocument object as loaded from the file path.
- Throws:
- IOException- Exception thrown if it can not be opened.
 
- 
fromFilepublic static InternalPdfDocument fromFile(String pdfFilePath, String password, String ownerPassword) throws IOException Opens an existing PDF document for editing.- Parameters:
- 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..)
- Returns:
- An IronPdf.PdfDocument object as loaded from the file path.
- Throws:
- IOException- Exception thrown if it can not be opened.
 
- 
fromBytespublic static InternalPdfDocument fromBytes(byte[] pdfFileBytes, String userPassword, String ownerPassword) Opens an existing PDF document for editing.- Parameters:
- 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..)
- Returns:
- the internal pdf document
 
- 
saveAspublic static void saveAs(InternalPdfDocument internalPdfDocument, String filePath) throws IOException Save as.- Parameters:
- internalPdfDocument- the internal pdf document
- filePath- the file path
- Throws:
- IOException- the io exception
 
- 
getBytesGets the binary data for the full PDF file as a byte array.- Parameters:
- internalPdfDocument- the internal pdf document
- Returns:
- the byte [ ]
 
- 
saveAsSave as.- Parameters:
- pdfData- the pdf data
- filePath- the file path
- Throws:
- IOException- the io exception
 
- 
fromBytesOpens an existing PDF document for editing.- Parameters:
- pdfFileBytes- The PDF file data as byte array.
- userPassword- Optional user password if the PDF document is encrypted.
- Returns:
- the internal pdf document
 
- 
fromBytesOpens an existing PDF document for editing.- Parameters:
- pdfFileBytes- The PDF file data as byte array.
- Returns:
- the internal pdf document
 
 
-