java.lang.Object
org.sejda.sambox.output.DefaultPDFWriter
- All Implemented Interfaces:
Closeable,AutoCloseable
Default PDF writer that writes part of the pdf document using the given
IndirectObjectsWriter.-
Field Summary
FieldsModifier and TypeFieldDescription(package private) byte(package private) byte[]private static final org.slf4j.Loggerprivate final IndirectObjectsWriter -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()private static voidsanitizeTrailer(COSDictionary trailer, long prev) voidwriteHeader(String version) (package private) IndirectObjectsWriterwriter()voidwriteTrailer(COSDictionary trailer, long startxref) Writes the given trailer setting startxref to the given offsetsvoidwriteTrailer(COSDictionary trailer, long startxref, long prev) Writes the given trailer setting the /Prev entry and startxref to the given offsetsprivate voidwriteXrefFooter(long startxref) voidwriteXrefStream(COSDictionary trailer) Writes an xref stream using the given trailervoidwriteXrefStream(COSDictionary trailer, long prev) Writes an xref stream using the given trailer and setting the /Prev entry to the given offsetlongwrites the xref table
-
Field Details
-
LOG
private static final org.slf4j.Logger LOG -
COMMENT
byte COMMENT -
GARBAGE
byte[] GARBAGE -
writer
-
-
Constructor Details
-
DefaultPDFWriter
-
-
Method Details
-
writeHeader
- Throws:
IOException
-
writeXrefTable
writes the xref table- Returns:
- the startxref value
- Throws:
IOException
-
writeTrailer
Writes the given trailer setting startxref to the given offsets- Parameters:
trailer-startxref-- Throws:
IOException
-
writeTrailer
Writes the given trailer setting the /Prev entry and startxref to the given offsets- Parameters:
trailer-startxref-prev- prev offset, written only if != -1- Throws:
IOException
-
writeXrefStream
Writes an xref stream using the given trailer- Parameters:
trailer-- Throws:
IOException
-
writeXrefStream
Writes an xref stream using the given trailer and setting the /Prev entry to the given offset- Parameters:
trailer-prev-- Throws:
IOException
-
sanitizeTrailer
-
writer
IndirectObjectsWriter writer() -
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-