Table of Contents

Class PdfXrefTable

Namespace
iText.Kernel.Pdf
Assembly
itext.kernel.dll

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 int

initial 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 int

initial capacity of xref table.

memoryLimitsAwareHandler MemoryLimitsAwareHandler

memoryLimitsAwareHandler 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 MemoryLimitsAwareHandler

custom MemoryLimitsAwareHandler to set.

Methods

Add(PdfIndirectReference)

Adds indirect reference to list of indirect objects.

public virtual PdfIndirectReference Add(PdfIndirectReference reference)

Parameters

reference PdfIndirectReference

indirect reference to add.

Returns

PdfIndirectReference

reference from param

CreateNextIndirectReference(PdfDocument)

Creates next available indirect reference.

protected virtual PdfIndirectReference CreateNextIndirectReference(PdfDocument document)

Parameters

document PdfDocument

is the current document

Returns

PdfIndirectReference

created indirect reference.

FreeReference(PdfIndirectReference)

Set the reference to free state.

protected virtual void FreeReference(PdfIndirectReference reference)

Parameters

reference PdfIndirectReference

is a reference to be updated.

Get(int)

Get appropriate reference to indirect object.

public virtual PdfIndirectReference Get(int index)

Parameters

index int

is 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 int

is a new capacity to set

SetMemoryLimitsAwareHandler(MemoryLimitsAwareHandler)

public virtual void SetMemoryLimitsAwareHandler(MemoryLimitsAwareHandler memoryLimitsAwareHandler)

Parameters

memoryLimitsAwareHandler MemoryLimitsAwareHandler

instance 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 PdfDocument

pdfDocument 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 PdfDocument

is the current document

fileId PdfObject

field id

crypto PdfObject

pdf encryption