iText 8.0.5 API
iText.Kernel.Pdf.PdfXrefTable Class Reference

A representation of a cross-referenced table of a PDF document. More...

Public Member Functions

  PdfXrefTable ()
  Creates a PdfXrefTable which will be used to store xref structure of the pdf document. More...
 
  PdfXrefTable (int capacity)
  Creates a PdfXrefTable which will be used to store xref structure of the pdf document. More...
 
  PdfXrefTable (MemoryLimitsAwareHandler memoryLimitsAwareHandler)
  Creates a PdfXrefTable which will be used to store xref structure of the pdf document. More...
 
  PdfXrefTable (int capacity, MemoryLimitsAwareHandler memoryLimitsAwareHandler)
  Creates a PdfXrefTable which will be used to store xref structure of the pdf document. More...
 
virtual void  SetMemoryLimitsAwareHandler (MemoryLimitsAwareHandler memoryLimitsAwareHandler)
  Sets custom MemoryLimitsAwareHandler. More...
 
virtual PdfIndirectReference  Add (PdfIndirectReference reference)
  Adds indirect reference to list of indirect objects. More...
 
virtual int  Size ()
  Get size of cross-reference table. More...
 
virtual int  GetCountOfIndirectObjects ()
  Calculates a number of stored references to indirect objects. More...
 
virtual PdfIndirectReference  Get (int index)
  Get appropriate reference to indirect object. More...
 

Package Functions

virtual PdfIndirectReference  CreateNextIndirectReference (PdfDocument document)
  Creates next available indirect reference. More...
 
virtual void  FreeReference (PdfIndirectReference reference)
  Set the reference to free state. More...
 
virtual int  GetCapacity ()
  Gets the capacity of xref stream. More...
 
virtual void  SetCapacity (int capacity)
  Increase capacity of the array of indirect references. More...
 
virtual void  WriteXrefTableAndTrailer (PdfDocument document, PdfObject fileId, PdfObject crypto)
  Writes cross reference table and trailer to PDF. More...
 

Static Package Functions

static void  WriteKeyInfo (PdfDocument document)
  Convenience method to write the fingerprint preceding the trailer. More...
 

Detailed Description

A representation of a cross-referenced table of a PDF document.

Constructor & Destructor Documentation

◆ PdfXrefTable() [1/4]

iText.Kernel.Pdf.PdfXrefTable.PdfXrefTable ( )
inline

Creates a PdfXrefTable which will be used to store xref structure of the pdf document.

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() [2/4]

iText.Kernel.Pdf.PdfXrefTable.PdfXrefTable ( int  capacity )
inline

Creates a PdfXrefTable which will be used to store xref structure of the pdf document.

Parameters
capacity initial capacity of xref table.

◆ PdfXrefTable() [3/4]

iText.Kernel.Pdf.PdfXrefTable.PdfXrefTable ( MemoryLimitsAwareHandler  memoryLimitsAwareHandler )
inline

Creates a PdfXrefTable which will be used to store xref structure of the pdf document.

Parameters
memoryLimitsAwareHandler custom MemoryLimitsAwareHandler to set.

◆ PdfXrefTable() [4/4]

iText.Kernel.Pdf.PdfXrefTable.PdfXrefTable ( int  capacity,
MemoryLimitsAwareHandler  memoryLimitsAwareHandler 
)
inline

Creates a PdfXrefTable which will be used to store xref structure of the pdf document.

Parameters
capacity initial capacity of xref table.
memoryLimitsAwareHandler memoryLimitsAwareHandler custom MemoryLimitsAwareHandler to set.

Member Function Documentation

◆ Add()

virtual PdfIndirectReference iText.Kernel.Pdf.PdfXrefTable.Add ( PdfIndirectReference  reference )
inlinevirtual

Adds indirect reference to list of indirect objects.

Parameters
reference indirect reference to add.
Returns
reference from param

◆ CreateNextIndirectReference()

virtual PdfIndirectReference iText.Kernel.Pdf.PdfXrefTable.CreateNextIndirectReference ( PdfDocument  document )
inlinepackagevirtual

Creates next available indirect reference.

Parameters
document is the current document
Returns
created indirect reference.

◆ FreeReference()

virtual void iText.Kernel.Pdf.PdfXrefTable.FreeReference ( PdfIndirectReference  reference )
inlinepackagevirtual

Set the reference to free state.

Parameters
reference is a reference to be updated.

◆ Get()

virtual PdfIndirectReference iText.Kernel.Pdf.PdfXrefTable.Get ( int  index )
inlinevirtual

Get appropriate reference to indirect object.

Parameters
index is the index of required object
Returns
reference to object with the provided index

◆ GetCapacity()

virtual int iText.Kernel.Pdf.PdfXrefTable.GetCapacity ( )
inlinepackagevirtual

Gets the capacity of xref stream.

Returns
the capacity of xref stream.

◆ GetCountOfIndirectObjects()

virtual int iText.Kernel.Pdf.PdfXrefTable.GetCountOfIndirectObjects ( )
inlinevirtual

Calculates a number of stored references to indirect objects.

Returns
number of indirect objects

◆ SetCapacity()

virtual void iText.Kernel.Pdf.PdfXrefTable.SetCapacity ( int  capacity )
inlinepackagevirtual

Increase capacity of the array of indirect references.

Parameters
capacity is a new capacity to set

◆ SetMemoryLimitsAwareHandler()

virtual void iText.Kernel.Pdf.PdfXrefTable.SetMemoryLimitsAwareHandler ( MemoryLimitsAwareHandler  memoryLimitsAwareHandler )
inlinevirtual

Sets custom MemoryLimitsAwareHandler.

Parameters
memoryLimitsAwareHandler instance to set.

◆ Size()

virtual int iText.Kernel.Pdf.PdfXrefTable.Size ( )
inlinevirtual

Get size of cross-reference table.

Returns
amount of lines including zero-object

◆ WriteKeyInfo()

static void iText.Kernel.Pdf.PdfXrefTable.WriteKeyInfo ( PdfDocument  document )
inlinestaticpackage

Convenience method to write the fingerprint preceding the trailer.

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.

Parameters
document pdfDocument to write the fingerprint to

◆ WriteXrefTableAndTrailer()

virtual void iText.Kernel.Pdf.PdfXrefTable.WriteXrefTableAndTrailer ( PdfDocument  document,
PdfObject  fileId,
PdfObject  crypto 
)
inlinepackagevirtual

Writes cross reference table and trailer to PDF.

Parameters
document is the current document
fileId field id
crypto pdf encryption