com.lowagie.text.pdf
public static class PdfWriter.PdfBody extends Object
This class covers the third section of Chapter 5 in the 'Portable Document Format Reference Manual version 1.3' (page 55-60). It contains the body of a PDF document (section 5.14) and it can also generate a Cross-reference Table (section 5.15).
See Also: PdfWriter PdfObject PdfIndirectObject
| Nested Class Summary | |
|---|---|
| static class | PdfWriter.PdfBody.PdfCrossReferencePdfCrossReference is an entry in the PDF Cross-Reference table. |
| Field Summary | |
|---|---|
| int | currentObjNum |
| ByteBuffer | index |
| int | numObj |
| static int | OBJSINSTREAM |
| int | position the current byte position in the body. |
| int | refnum |
| ByteBuffer | streamObjects |
| PdfWriter | writer |
| TreeSet | xrefs array containing the cross-reference table of the normal objects. |
| Constructor Summary | |
|---|---|
| PdfBody(PdfWriter writer)
Constructs a new PdfBody. | |
| Method Summary | |
|---|---|
| PdfIndirectObject | add(PdfObject object)
Adds a PdfObject to the body.
|
| PdfIndirectObject | add(PdfObject object, boolean inObjStm) |
| PdfIndirectObject | add(PdfObject object, PdfIndirectReference ref)
Adds a PdfObject to the body given an already existing
PdfIndirectReference.
|
| PdfIndirectObject | add(PdfObject object, PdfIndirectReference ref, boolean inObjStm) |
| PdfIndirectObject | add(PdfObject object, int refNumber) |
| PdfIndirectObject | add(PdfObject object, int refNumber, boolean inObjStm) |
| PdfWriter.PdfBody.PdfCrossReference | addToObjStm(PdfObject obj, int nObj) |
| void | flushObjStm() |
| int | getIndirectReferenceNumber() |
| PdfIndirectReference | getPdfIndirectReference()
Gets a PdfIndirectReference for an object that will be created in the future. |
| int | offset()
Returns the offset of the Cross-Reference table.
|
| void | setRefnum(int refnum) |
| int | size()
Returns the total number of objects contained in the CrossReferenceTable of this Body.
|
| void | writeCrossReferenceTable(OutputStream os, PdfIndirectReference root, PdfIndirectReference info, PdfIndirectReference encryption, PdfObject fileID, int prevxref)
Returns the CrossReferenceTable of the Body. |
PdfBody.Parameters: writer
PdfObject to the body.
This methods creates a PdfIndirectObject with a
certain number, containing the given PdfObject.
It also adds a PdfCrossReference for this object
to an ArrayList that will be used to build the
Cross-reference Table.
Parameters: object a PdfObject
Returns: a PdfIndirectObject
Throws: IOException
PdfObject to the body given an already existing
PdfIndirectReference.
This methods creates a PdfIndirectObject with the number given by
ref, containing the given PdfObject.
It also adds a PdfCrossReference for this object
to an ArrayList that will be used to build the
Cross-reference Table.
Parameters: object a PdfObject ref a PdfIndirectReference
Returns: a PdfIndirectObject
Throws: IOException
Returns: a PdfIndirectReference
Returns: an offset
Body.
Returns: a number of objects
Body.Parameters: os root info encryption fileID prevxref
Throws: IOException