public class PdfXrefTable extends Object implements Serializable
Constructor and Description |
---|
PdfXrefTable() |
PdfXrefTable(int capacity) |
Modifier and Type | Method and Description |
---|---|
PdfIndirectReference |
add(PdfIndirectReference reference)
Adds indirect reference to list of indirect objects.
|
protected PdfIndirectReference |
createNextIndirectReference(PdfDocument document)
Creates next available indirect reference.
|
protected void |
freeReference(PdfIndirectReference reference)
Set the reference to free state.
|
PdfIndirectReference |
get(int index)
Get appropriate reference to indirect object.
|
int |
getCountOfIndirectObjects()
Calculates a number of stored references to indirect objects.
|
protected void |
setCapacity(int capacity)
Increase capacity of the array of indirect references.
|
int |
size()
Get size of cross-reference table.
|
protected static void |
writeKeyInfo(PdfDocument document)
Convenience method to write the fingerprint preceding the trailer.
|
protected void |
writeXrefTableAndTrailer(PdfDocument document, PdfObject fileId, PdfObject crypto)
Writes cross reference table and trailer to PDF.
|
public PdfXrefTable()
public PdfXrefTable(int capacity)
public PdfIndirectReference add(PdfIndirectReference reference)
reference
- indirect reference to add.
public int size()
public int getCountOfIndirectObjects()
public PdfIndirectReference get(int index)
index
- is the index of required object
protected PdfIndirectReference createNextIndirectReference(PdfDocument document)
document
- is the current document
protected void freeReference(PdfIndirectReference reference)
reference
- is a reference to be updated.
protected void setCapacity(int capacity)
capacity
- is a new capacity to set
protected void writeXrefTableAndTrailer(PdfDocument document, PdfObject fileId, PdfObject crypto) throws IOException
document
- is the current document
fileId
- field id
crypto
- pdf encryption
IOException
- if any I/O error occurs
protected static void writeKeyInfo(PdfDocument document)
document
- pdfDocument to write the fingerprint to
Copyright © 1998–2023 iText Group NV. All rights reserved.