java.lang.Object
org.sejda.sambox.output.PDDocumentWriter
- All Implemented Interfaces:
Closeable,AutoCloseable
Writer for a
PDDocument. This component provides methods to write a PDDocument to a
CountingWritableByteChannel.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate PDFWriteContextprivate Optional<EncryptionContext>private static final org.slf4j.Loggerprivate DefaultPDFWriter -
Constructor Summary
ConstructorsConstructorDescriptionPDDocumentWriter(org.sejda.io.CountingWritableByteChannel channel, Optional<EncryptionContext> encryptionContext, WriteOption... options) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()private PDFBodyObjectsWriterobjectStreamWriter(PDFBodyObjectsWriter wrapped) private PDFBodyObjectsWritervoidwrite(PDDocument document) Writes thePDDocument.private voidwriteBody(COSDocument document) private voidwriteXref(PDDocument document)
-
Field Details
-
LOG
private static final org.slf4j.Logger LOG -
writer
-
context
-
encryptionContext
-
-
Constructor Details
-
PDDocumentWriter
public PDDocumentWriter(org.sejda.io.CountingWritableByteChannel channel, Optional<EncryptionContext> encryptionContext, WriteOption... options)
-
-
Method Details
-
write
Writes thePDDocument.- Parameters:
document-- Throws:
IOException
-
writeBody
- Throws:
IOException
-
objectsWriter
-
objectStreamWriter
-
writeXref
- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-