public class PdfWriter extends PdfOutputStream implements Serializable
| Modifier and Type | Field and Description |
|---|---|
protected Map<Integer,PdfIndirectReference> |
copiedObjects |
protected boolean |
isUserWarnedAboutAcroFormCopying |
protected WriterProperties |
properties |
crypto, documentcloseStream, currentPos, outputStream| Constructor and Description |
|---|
PdfWriter(OutputStream os) |
PdfWriter(OutputStream os, WriterProperties properties) |
PdfWriter(String filename) |
PdfWriter(String filename, WriterProperties properties) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected PdfObject |
copyObject(PdfObject object, PdfDocument document, boolean allowDuplicating) |
protected void |
flushModifiedWaitingObjects()
Flushes all modified objects which have not been flushed yet.
|
protected void |
flushObject(PdfObject pdfObject, boolean canBeInObjStm)
Flushes the object.
|
protected void |
flushWaitingObjects()
Flushes all objects which have not been flushed yet.
|
int |
getCompressionLevel()
Gets default compression level for @see PdfStream.
|
protected int |
getCopyObjectKey(PdfObject object)
Calculates hash code for object to be copied.
|
boolean |
isFullCompression()
Indicates if to use full compression mode.
|
PdfWriter |
setCompressionLevel(int compressionLevel)
Sets default compression level for @see PdfStream.
|
PdfWriter |
setSmartMode(boolean smartMode)
Sets the smart mode.
|
void |
write(byte[] b) |
void |
write(byte[] b, int off, int len) |
void |
write(int b) |
protected void |
writeHeader()
Writes PDF header.
|
protected void |
writeToBody(PdfObject object)
Writes object to body of PDF document.
|
checkEncryption, containsFlateFilter, decodeFlateBytes, updateCompressionFilter, writeassignBytes, flush, getCurrentPos, getHighPrecision, getOutputStream, isCloseStream, reset, setCloseStream, setHighPrecision, writeByte, writeByte, writeBytes, writeBytes, writeDouble, writeDouble, writeFloat, writeFloat, writeFloats, writeInteger, writeLong, writeNewLine, writeSpace, writeStringprotected WriterProperties properties
protected Map<Integer,PdfIndirectReference> copiedObjects
protected boolean isUserWarnedAboutAcroFormCopying
public PdfWriter(OutputStream os)
public PdfWriter(OutputStream os, WriterProperties properties)
public PdfWriter(String filename) throws FileNotFoundException
FileNotFoundException
public PdfWriter(String filename, WriterProperties properties) throws FileNotFoundException
FileNotFoundException
public boolean isFullCompression()
public int getCompressionLevel()
Deflater.
public PdfWriter setCompressionLevel(int compressionLevel)
Deflater.
compressionLevel - compression level.
public PdfWriter setSmartMode(boolean smartMode)
public void write(int b)
throws IOException
write in class OutputStream<PdfOutputStream>
IOException
public void write(byte[] b)
throws IOException
write in class OutputStream<PdfOutputStream>
IOException
public void write(byte[] b,
int off,
int len)
throws IOException
write in class OutputStream<PdfOutputStream>
IOException
public void close()
throws IOException
close in interface Closeable
close in interface AutoCloseable
close in class OutputStream<PdfOutputStream>
IOException
protected void flushObject(PdfObject pdfObject, boolean canBeInObjStm) throws IOException
pdfObject - object to flush.
canBeInObjStm - indicates whether object can be placed into object stream.
IOException
PdfException
protected PdfObject copyObject(PdfObject object, PdfDocument document, boolean allowDuplicating)
protected void writeToBody(PdfObject object) throws IOException
object - object to write.
IOException
PdfException
protected void writeHeader()
PdfException
protected void flushWaitingObjects()
PdfException
protected void flushModifiedWaitingObjects()
PdfException
protected int getCopyObjectKey(PdfObject object)
object - object to be copied.
Copyright © 1998–2016 iText Group NV. All rights reserved.