iText 8.0.2 API
iText.Kernel.Pdf.PdfCatalog Class Reference

The root of a document’s object hierarchy. More...

Inheritance diagram for iText.Kernel.Pdf.PdfCatalog:
iText.Kernel.Pdf.PdfObjectWrapper< PdfDictionary >

Public Member Functions

virtual PdfOCProperties  GetOCProperties (bool createIfNotExists)
  Use this method to get the Optional Content Properties Dictionary. More...
 
virtual PdfDocument  GetDocument ()
  Get PdfDocument with indirect reference associated with the object. More...
 
override void  Flush ()
  PdfCatalog will be flushed in PdfDocument.close(). More...
 
virtual iText.Kernel.Pdf.PdfCatalog  SetOpenAction (PdfDestination destination)
  A value specifying a destination that shall be displayed when the document is opened. More...
 
virtual iText.Kernel.Pdf.PdfCatalog  SetOpenAction (PdfAction action)
  A value specifying an action that shall be performed when the document is opened. More...
 
virtual iText.Kernel.Pdf.PdfCatalog  SetAdditionalAction (PdfName key, PdfAction action)
  The actions that shall be taken in response to various trigger events affecting the document as a whole. More...
 
virtual PdfName  GetPageMode ()
  Get page mode of the document. More...
 
virtual iText.Kernel.Pdf.PdfCatalog  SetPageMode (PdfName pageMode)
  This method sets a page mode of the document. More...
 
virtual PdfName  GetPageLayout ()
  Get page layout of the document. More...
 
virtual iText.Kernel.Pdf.PdfCatalog  SetPageLayout (PdfName pageLayout)
  This method sets a page layout of the document More...
 
virtual PdfViewerPreferences  GetViewerPreferences ()
  Get viewer preferences of the document. More...
 
virtual iText.Kernel.Pdf.PdfCatalog  SetViewerPreferences (PdfViewerPreferences preferences)
  This method sets the document viewer preferences, specifying the way the document shall be displayed on the screen More...
 
virtual PdfNameTree  GetNameTree (PdfName treeType)
  This method gets Names tree from the catalog. More...
 
virtual bool  NameTreeContainsKey (PdfName treeType)
  This method checks Names tree for specified tree type. More...
 
virtual PdfNumTree  GetPageLabelsTree (bool createIfNotExists)
  This method returns the NumberTree of Page Labels More...
 
virtual PdfString  GetLang ()
  Get natural language. More...
 
virtual void  SetLang (PdfString lang)
  An entry specifying the natural language, and optionally locale. More...
 
virtual void  AddDeveloperExtension (PdfDeveloperExtension extension)
  Add an extensions dictionary containing developer prefix identification and version numbers for developer extensions that occur in this document. More...
 
virtual PdfCollection  GetCollection ()
  Gets collection dictionary that a conforming reader shall use to enhance the presentation of file attachments stored in the PDF document. More...
 
virtual iText.Kernel.Pdf.PdfCatalog  SetCollection (PdfCollection collection)
  Sets collection dictionary that a conforming reader shall use to enhance the presentation of file attachments stored in the PDF document. More...
 
virtual iText.Kernel.Pdf.PdfCatalog  Put (PdfName key, PdfObject value)
  Add key and value to PdfCatalog dictionary. More...
 
virtual iText.Kernel.Pdf.PdfCatalog  Remove (PdfName key)
  Remove key from catalog dictionary. More...
 
- Public Member Functions inherited from iText.Kernel.Pdf.PdfObjectWrapper< PdfDictionary >
virtual T  GetPdfObject ()
 
virtual iText.Kernel.Pdf.PdfObjectWrapper< T >  MakeIndirect (PdfDocument document, PdfIndirectReference reference)
  Marks object behind wrapper to be saved as indirect. More...
 
virtual iText.Kernel.Pdf.PdfObjectWrapper< T >  MakeIndirect (PdfDocument document)
  Marks object behind wrapper to be saved as indirect. More...
 
virtual iText.Kernel.Pdf.PdfObjectWrapper< T >  SetModified ()
 
virtual bool  IsFlushed ()
 

Detailed Description

The root of a document’s object hierarchy.

Member Function Documentation

◆ AddDeveloperExtension()

virtual void iText.Kernel.Pdf.PdfCatalog.AddDeveloperExtension ( PdfDeveloperExtension  extension )
inlinevirtual

Add an extensions dictionary containing developer prefix identification and version numbers for developer extensions that occur in this document.

Add an extensions dictionary containing developer prefix identification and version numbers for developer extensions that occur in this document. See ISO 32000-1, Table 28 – Entries in the catalog dictionary.

Parameters
extension enables developers to identify their own extension relative to a base version of PDF

◆ Flush()

override void iText.Kernel.Pdf.PdfCatalog.Flush ( )
inlinevirtual

PdfCatalog will be flushed in PdfDocument.close().

PdfCatalog will be flushed in PdfDocument.close(). User mustn't flush PdfCatalog!

Reimplemented from iText.Kernel.Pdf.PdfObjectWrapper< PdfDictionary >.

◆ GetCollection()

virtual PdfCollection iText.Kernel.Pdf.PdfCatalog.GetCollection ( )
inlinevirtual

Gets collection dictionary that a conforming reader shall use to enhance the presentation of file attachments stored in the PDF document.

Returns

iText.Kernel.Pdf.Collection.PdfCollection wrapper of collection dictionary.

◆ GetDocument()

virtual PdfDocument iText.Kernel.Pdf.PdfCatalog.GetDocument ( )
inlinevirtual

Get PdfDocument with indirect reference associated with the object.

Returns
the resultant dictionary

◆ GetLang()

virtual PdfString iText.Kernel.Pdf.PdfCatalog.GetLang ( )
inlinevirtual

Get natural language.

Returns
natural language

◆ GetNameTree()

virtual PdfNameTree iText.Kernel.Pdf.PdfCatalog.GetNameTree ( PdfName  treeType )
inlinevirtual

This method gets Names tree from the catalog.

Parameters
treeType type of the tree (Dests, AP, EmbeddedFiles etc).
Returns
returns PdfNameTree

◆ GetOCProperties()

virtual PdfOCProperties iText.Kernel.Pdf.PdfCatalog.GetOCProperties ( bool  createIfNotExists )
inlinevirtual

Use this method to get the Optional Content Properties Dictionary.

Use this method to get the Optional Content Properties Dictionary. Note that if you call this method, then the PdfDictionary with OCProperties will be generated from iText.Kernel.Pdf.Layer.PdfOCProperties object right before closing the PdfDocument , so if you want to make low-level changes in Pdf structures themselves ( PdfArray , PdfDictionary , etc), then you should address directly those objects, e.g.: PdfCatalog pdfCatalog = pdfDoc.getCatalog(); PdfDictionary ocProps = pdfCatalog.getAsDictionary(PdfName.OCProperties); // manipulate with ocProps. Also note that this method is implicitly called when creating a new PdfLayer instance, so you should either use hi-level logic of operating with layers, or manipulate low-level Pdf objects by yourself.

Parameters
createIfNotExists true to create new /OCProperties entry in catalog if not exists, false to return null if /OCProperties entry in catalog is not present.
Returns
the Optional Content Properties Dictionary

◆ GetPageLabelsTree()

virtual PdfNumTree iText.Kernel.Pdf.PdfCatalog.GetPageLabelsTree ( bool  createIfNotExists )
inlinevirtual

This method returns the NumberTree of Page Labels

Parameters
createIfNotExists defines whether the NumberTree of Page Labels should be created if it didn't exist before
Returns
returns PdfNumTree

◆ GetPageLayout()

virtual PdfName iText.Kernel.Pdf.PdfCatalog.GetPageLayout ( )
inlinevirtual

Get page layout of the document.

Returns
name object of page layout that shall be used when document is opened

◆ GetPageMode()

virtual PdfName iText.Kernel.Pdf.PdfCatalog.GetPageMode ( )
inlinevirtual

Get page mode of the document.

Returns
current instance of PdfCatalog

◆ GetViewerPreferences()

virtual PdfViewerPreferences iText.Kernel.Pdf.PdfCatalog.GetViewerPreferences ( )
inlinevirtual

Get viewer preferences of the document.

Returns
dictionary of viewer preferences

◆ NameTreeContainsKey()

virtual bool iText.Kernel.Pdf.PdfCatalog.NameTreeContainsKey ( PdfName  treeType )
inlinevirtual

This method checks Names tree for specified tree type.

Parameters
treeType type of tree which existence should be checked
Returns
true if such tree exists, false otherwise

◆ Put()

virtual iText.Kernel.Pdf.PdfCatalog iText.Kernel.Pdf.PdfCatalog.Put ( PdfName  key,
PdfObject  value 
)
inlinevirtual

Add key and value to PdfCatalog dictionary.

Parameters
key the dictionary key corresponding with the PDF object
value the value of key
Returns
the key and value

◆ Remove()

virtual iText.Kernel.Pdf.PdfCatalog iText.Kernel.Pdf.PdfCatalog.Remove ( PdfName  key )
inlinevirtual

Remove key from catalog dictionary.

Parameters
key the dictionary key corresponding with the PDF object
Returns
the key

◆ SetAdditionalAction()

virtual iText.Kernel.Pdf.PdfCatalog iText.Kernel.Pdf.PdfCatalog.SetAdditionalAction ( PdfName  key,
PdfAction  action 
)
inlinevirtual

The actions that shall be taken in response to various trigger events affecting the document as a whole.

The actions that shall be taken in response to various trigger events affecting the document as a whole. See ISO 32000-1, Table 28 – Entries in the catalog dictionary.

Parameters
key the key of which the associated value needs to be returned
action instance of iText.Kernel.Pdf.Action.PdfAction.
Returns
additional action

◆ SetCollection()

virtual iText.Kernel.Pdf.PdfCatalog iText.Kernel.Pdf.PdfCatalog.SetCollection ( PdfCollection  collection )
inlinevirtual

Sets collection dictionary that a conforming reader shall use to enhance the presentation of file attachments stored in the PDF document.

Parameters
collection

dictionary

Returns

PdfCatalog instance with applied collection dictionary

◆ SetLang()

virtual void iText.Kernel.Pdf.PdfCatalog.SetLang ( PdfString  lang )
inlinevirtual

An entry specifying the natural language, and optionally locale.

An entry specifying the natural language, and optionally locale. Use this to specify the Language attribute on a Tagged Pdf element. For the content usage dictionary, use PdfName.Language

Parameters
lang

language to be set

◆ SetOpenAction() [1/2]

virtual iText.Kernel.Pdf.PdfCatalog iText.Kernel.Pdf.PdfCatalog.SetOpenAction ( PdfAction  action )
inlinevirtual

A value specifying an action that shall be performed when the document is opened.

A value specifying an action that shall be performed when the document is opened. See ISO 32000-1, Table 28 – Entries in the catalog dictionary.

Parameters
action instance of iText.Kernel.Pdf.Action.PdfAction.
Returns
action

◆ SetOpenAction() [2/2]

virtual iText.Kernel.Pdf.PdfCatalog iText.Kernel.Pdf.PdfCatalog.SetOpenAction ( PdfDestination  destination )
inlinevirtual

A value specifying a destination that shall be displayed when the document is opened.

A value specifying a destination that shall be displayed when the document is opened. See ISO 32000-1, Table 28 – Entries in the catalog dictionary.

Parameters
destination instance of iText.Kernel.Pdf.Navigation.PdfDestination.
Returns
destination

◆ SetPageLayout()

virtual iText.Kernel.Pdf.PdfCatalog iText.Kernel.Pdf.PdfCatalog.SetPageLayout ( PdfName  pageLayout )
inlinevirtual

This method sets a page layout of the document

Parameters
pageLayout page layout of the document
Returns

PdfCatalog instance with applied page layout

◆ SetPageMode()

virtual iText.Kernel.Pdf.PdfCatalog iText.Kernel.Pdf.PdfCatalog.SetPageMode ( PdfName  pageMode )
inlinevirtual

This method sets a page mode of the document.

This method sets a page mode of the document.
Valid values are: PdfName.UseNone , PdfName.UseOutlines , PdfName.UseThumbs , PdfName.FullScreen , PdfName.UseOC , PdfName.UseAttachments.

Parameters
pageMode page mode.
Returns
current instance of PdfCatalog

◆ SetViewerPreferences()

virtual iText.Kernel.Pdf.PdfCatalog iText.Kernel.Pdf.PdfCatalog.SetViewerPreferences ( PdfViewerPreferences  preferences )
inlinevirtual

This method sets the document viewer preferences, specifying the way the document shall be displayed on the screen

Parameters
preferences document's viewer preferences
Returns

PdfCatalog instance with applied viewer preferences