Class PDFBodyWriter

java.lang.Object
org.sejda.sambox.output.PDFBodyWriter
All Implemented Interfaces:
Closeable, AutoCloseable, COSVisitor
Direct Known Subclasses:
ExistingPagesSizePredictor, IncrementalPDFBodyWriter

class PDFBodyWriter extends Object implements COSVisitor, Closeable
Base component providing methods to write the body of a pdf document. This implementation starts from the document trailer and visits the whole document graph updating the PDFWriteContext. An IndirectCOSObjectReference is created by the context for each COSDictionary and ExistingIndirectCOSObject, if not previously created. Once all the values of a COSDictionary or COSArray have been explored, the COSDictionary/ COSArray is written as a pdf object, this allows an async implementation to write objects while the body writer is still performing its algorithm.