public class PdfXrefTable extends Object
Constructor and Description |
---|
PdfXrefTable()
Creates a PdfXrefTable which will be used to store xref structure of the pdf document.
|
PdfXrefTable(int capacity)
Creates a PdfXrefTable which will be used to store xref structure of the pdf document.
|
PdfXrefTable(int capacity, MemoryLimitsAwareHandler memoryLimitsAwareHandler)
Creates a PdfXrefTable which will be used to store xref structure of the pdf document.
|
PdfXrefTable(MemoryLimitsAwareHandler memoryLimitsAwareHandler)
Creates a PdfXrefTable which will be used to store xref structure of the pdf document.
|
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.
|
protected int |
getCapacity()
Gets the capacity of xref stream.
|
int |
getCountOfIndirectObjects()
Calculates a number of stored references to indirect objects.
|
protected void |
setCapacity(int capacity)
Increase capacity of the array of indirect references.
|
void |
setMemoryLimitsAwareHandler(MemoryLimitsAwareHandler memoryLimitsAwareHandler)
Sets custom MemoryLimitsAwareHandler .
|
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()
PdfXrefTable
which will be used to store xref structure of the pdf document. Capacity and MemoryLimitsAwareHandler
instance would be set by default values.
public PdfXrefTable(int capacity)
PdfXrefTable
which will be used to store xref structure of the pdf document.
capacity
- initial capacity of xref table.
public PdfXrefTable(MemoryLimitsAwareHandler memoryLimitsAwareHandler)
PdfXrefTable
which will be used to store xref structure of the pdf document.
memoryLimitsAwareHandler
- custom MemoryLimitsAwareHandler
to set.
public PdfXrefTable(int capacity, MemoryLimitsAwareHandler memoryLimitsAwareHandler)
PdfXrefTable
which will be used to store xref structure of the pdf document.
capacity
- initial capacity of xref table.
memoryLimitsAwareHandler
- memoryLimitsAwareHandler custom MemoryLimitsAwareHandler
to set.
public void setMemoryLimitsAwareHandler(MemoryLimitsAwareHandler memoryLimitsAwareHandler)
MemoryLimitsAwareHandler
.
memoryLimitsAwareHandler
- instance to set.
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 static void writeKeyInfo(PdfDocument document)
document
- pdfDocument to write the fingerprint to
protected PdfIndirectReference createNextIndirectReference(PdfDocument document)
document
- is the current document
protected void freeReference(PdfIndirectReference reference)
reference
- is a reference to be updated.
protected int getCapacity()
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
Copyright © 1998–2022 iText Group NV. All rights reserved.