PDFWriter
Overview
PDFWriter is a class in Aspose.Pdf FOSS for Java.
Serializes a graph of COS objects into a valid PDF file.
Methods
| Signature | Description |
|---|---|
setEncryptor(encryptor: PDFEncryptor, encryptDictKey: COSObjectKey) | Sets the encryptor for write-side encryption. |
PDFWriter(output: OutputStream, pdfVersion: float) | Constructs a new PDFWriter. |
write(trailer: COSDictionary, objects: Map<COSObjectKey, COSBase>) | Writes a complete PDF file: header, objects, xref table, and trailer. |
writeIncremental(original: RandomAccessReader, trailer: COSDictionary, modifiedObjects: Map<COSObjectKey, COSBase>) | Writes an incremental update to an existing PDF. |
allocateObjectNumber() → COSObjectKey | Assigns a new object number and returns the key. |
writeCompressed(trailer: COSDictionary, objects: Map<COSObjectKey, COSBase>, maxPerStream: int) | Writes a complete PDF with object streams and xref stream (PDF 1.5+). |
writeIncrementalWithXRefStream(original: RandomAccessReader, trailer: COSDictionary, modifiedObjects: Map<COSObjectKey, COSBase>) | Writes an incremental update using an xref stream instead of a text xref table. |