iText 7 7.1.9 API
iText.Kernel.Pdf.PdfCatalog Class Reference
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 ()
 
override void  Flush ()
  PdfCatalog will be flushed in PdfDocument.close(). More...
 
virtual iText.Kernel.Pdf.PdfCatalog  SetOpenAction (PdfDestination destination)
 
virtual iText.Kernel.Pdf.PdfCatalog  SetOpenAction (PdfAction action)
 
virtual iText.Kernel.Pdf.PdfCatalog  SetAdditionalAction (PdfName key, PdfAction action)
 
virtual iText.Kernel.Pdf.PdfCatalog  SetPageMode (PdfName pageMode)
  This method sets a page mode of the document. More...
 
virtual PdfName  GetPageMode ()
 
virtual iText.Kernel.Pdf.PdfCatalog  SetPageLayout (PdfName pageLayout)
  This method sets a page layout of the document More...
 
virtual PdfName  GetPageLayout ()
 
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 PdfViewerPreferences  GetViewerPreferences ()
 
virtual PdfNameTree  GetNameTree (PdfName treeType)
  This method gets Names tree from the catalog. More...
 
virtual PdfNumTree  GetPageLabelsTree (bool createIfNotExists)
  This method returns the NumberTree of Page Labels More...
 
virtual void  SetLang (PdfString lang)
  An entry specifying the natural language, and optionally locale. More...
 
virtual PdfString  GetLang ()
 
virtual void  AddDeveloperExtension (PdfDeveloperExtension extension)
 
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)
 
virtual iText.Kernel.Pdf.PdfCatalog  Remove (PdfName key)
 
- 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 ()
 

Member Function Documentation

◆ 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.

◆ 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 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

Returns
returns PdfNumTree

◆ 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

◆ 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

◆ 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

◆ 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