Class PdfXrefTable
A representation of a cross-referenced table of a PDF document.
public class PdfXrefTable
- Inheritance
-
PdfXrefTable
- Inherited Members
Constructors
PdfXrefTable()
Creates a PdfXrefTable which will be used to store xref structure of the pdf document.
public PdfXrefTable()
Remarks
Creates a PdfXrefTable which will be used to store xref structure of the pdf document. Capacity and MemoryLimitsAwareHandler instance would be set by default values.
PdfXrefTable(int)
Creates a PdfXrefTable which will be used to store xref structure of the pdf document.
public PdfXrefTable(int capacity)
Parameters
capacity
intinitial capacity of xref table.
PdfXrefTable(int, MemoryLimitsAwareHandler)
Creates a PdfXrefTable which will be used to store xref structure of the pdf document.
public PdfXrefTable(int capacity, MemoryLimitsAwareHandler memoryLimitsAwareHandler)
Parameters
capacity
intinitial capacity of xref table.
memoryLimitsAwareHandler
MemoryLimitsAwareHandlermemoryLimitsAwareHandler custom MemoryLimitsAwareHandler to set.
PdfXrefTable(MemoryLimitsAwareHandler)
Creates a PdfXrefTable which will be used to store xref structure of the pdf document.
public PdfXrefTable(MemoryLimitsAwareHandler memoryLimitsAwareHandler)
Parameters
memoryLimitsAwareHandler
MemoryLimitsAwareHandlercustom MemoryLimitsAwareHandler to set.
Methods
Add(PdfIndirectReference)
Adds indirect reference to list of indirect objects.
public virtual PdfIndirectReference Add(PdfIndirectReference reference)
Parameters
reference
PdfIndirectReferenceindirect reference to add.
Returns
- PdfIndirectReference
reference from param
CreateNextIndirectReference(PdfDocument)
Creates next available indirect reference.
protected virtual PdfIndirectReference CreateNextIndirectReference(PdfDocument document)
Parameters
document
PdfDocumentis the current document
Returns
- PdfIndirectReference
created indirect reference.
FreeReference(PdfIndirectReference)
Set the reference to free state.
protected virtual void FreeReference(PdfIndirectReference reference)
Parameters
reference
PdfIndirectReferenceis a reference to be updated.
Get(int)
Get appropriate reference to indirect object.
public virtual PdfIndirectReference Get(int index)
Parameters
index
intis the index of required object
Returns
- PdfIndirectReference
reference to object with the provided index
GetCapacity()
Gets the capacity of xref stream.
protected virtual int GetCapacity()
Returns
- int
the capacity of xref stream.
GetCountOfIndirectObjects()
Calculates a number of stored references to indirect objects.
public virtual int GetCountOfIndirectObjects()
Returns
- int
number of indirect objects
SetCapacity(int)
Increase capacity of the array of indirect references.
protected virtual void SetCapacity(int capacity)
Parameters
capacity
intis a new capacity to set
SetMemoryLimitsAwareHandler(MemoryLimitsAwareHandler)
Sets custom MemoryLimitsAwareHandler.
public virtual void SetMemoryLimitsAwareHandler(MemoryLimitsAwareHandler memoryLimitsAwareHandler)
Parameters
memoryLimitsAwareHandler
MemoryLimitsAwareHandlerinstance to set.
Size()
Get size of cross-reference table.
public virtual int Size()
Returns
- int
amount of lines including zero-object
WriteKeyInfo(PdfDocument)
Convenience method to write the fingerprint preceding the trailer.
protected static void WriteKeyInfo(PdfDocument document)
Parameters
document
PdfDocumentpdfDocument to write the fingerprint to
Remarks
Convenience method to write the fingerprint preceding the trailer. The fingerprint contains information on iText products used in the generation or manipulation of an outputted PDF file.
WriteXrefTableAndTrailer(PdfDocument, PdfObject, PdfObject)
Writes cross reference table and trailer to PDF.
protected virtual void WriteXrefTableAndTrailer(PdfDocument document, PdfObject fileId, PdfObject crypto)
Parameters
document
PdfDocumentis the current document
fileId
PdfObjectfield id
crypto
PdfObjectpdf encryption