Class PdfDocument_Api
- java.lang.Object
- 
- com.ironsoftware.ironpdf.internal.staticapi.PdfDocument_Api
 
- 
 public final class PdfDocument_Api extends Object The type Pdf document api.
- 
- 
Constructor SummaryConstructors Constructor Description PdfDocument_Api()
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static InternalPdfDocumentfromBytes(byte[] pdfFileBytes)Opens an existing PDF document for editing.static InternalPdfDocumentfromBytes(byte[] pdfFileBytes, String userPassword)Opens an existing PDF document for editing.static InternalPdfDocumentfromBytes(byte[] pdfFileBytes, String userPassword, String ownerPassword, ChangeTrackingModes trackChanges)Opens an existing PDF document for editing.static InternalPdfDocumentfromFile(String pdfFilePath)Opens an existing PDF document for editing.static InternalPdfDocumentfromFile(String pdfFilePath, String password)Opens an existing PDF document for editing.static InternalPdfDocumentfromFile(String pdfFilePath, String password, String ownerPassword, ChangeTrackingModes trackChanges)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 byte[]getRevision(InternalPdfDocument internalPdfDocument, int index)Gets the binary data for the full PDF file as a byte array.static voidsaveAs(byte[] pdfData, String filePath)Save as.static voidsaveAs(InternalPdfDocument internalPdfDocument, String filePath)Save as.static voidsaveAsRevision(InternalPdfDocument internalPdfDocument, String filePath)Save as.static InternalPdfDocumenttoPdfA(InternalPdfDocument internalPdfDocument, byte[] customICCFileBytes)static InternalPdfDocumenttoPdfUA(InternalPdfDocument internalPdfDocument)
 
- 
- 
- 
Method Detail- 
fromFilepublic static InternalPdfDocument fromFile(String pdfFilePath) throws IOException Opens 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.
 
 - 
fromFilepublic static InternalPdfDocument fromFile(String pdfFilePath, String password) 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.
- 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, ChangeTrackingModes trackChanges) 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, ChangeTrackingModes trackChanges) 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
 
 - 
saveAsRevisionpublic static void saveAsRevision(InternalPdfDocument internalPdfDocument, String filePath) throws IOException Save as. Saves current changes as a revision and returns the revised the document, optionally also saving the document to disk- Parameters:
- internalPdfDocument- the internal pdf document
- filePath- the file path
- Throws:
- IOException- the io exception
 
 - 
getBytespublic static byte[] getBytes(InternalPdfDocument internalPdfDocument, boolean isIncremental) Gets the binary data for the full PDF file as a byte array.- Parameters:
- internalPdfDocument- the internal pdf document
- isIncremental- isIncremental
- Returns:
- the pdf byte array
 
 - 
getRevisionpublic static byte[] getRevision(InternalPdfDocument internalPdfDocument, int index) Gets the binary data for the full PDF file as a byte array.- Parameters:
- internalPdfDocument- the internal pdf document
- index- revision index
- Returns:
- the internal pdf document
 
 - 
saveAspublic static void saveAs(byte[] pdfData, String filePath) throws IOExceptionSave as.- Parameters:
- pdfData- the pdf data
- filePath- the file path
- Throws:
- IOException- the io exception
 
 - 
fromBytespublic static InternalPdfDocument fromBytes(byte[] pdfFileBytes, String userPassword) 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.
- Returns:
- the internal pdf document
 
 - 
fromBytespublic static InternalPdfDocument fromBytes(byte[] pdfFileBytes) Opens an existing PDF document for editing.- Parameters:
- pdfFileBytes- The PDF file data as byte array.
- Returns:
- the internal pdf document
 
 - 
toPdfApublic static InternalPdfDocument toPdfA(InternalPdfDocument internalPdfDocument, byte[] customICCFileBytes) 
 - 
toPdfUApublic static InternalPdfDocument toPdfUA(InternalPdfDocument internalPdfDocument) 
 
- 
 
-