←Select platform

PDFBookmark Structure

Summary

Provides information about PDF bookmark properties

Syntax
C#
VB
C++
Java
[SerializableAttribute()] 
public struct PDFBookmark 
<SerializableAttribute()> 
Public Structure PDFBookmark  
   Inherits System.ValueType 
public class PDFBookmark 
[SerializableAttribute()] 
public value class PDFBookmark : public System.ValueType  

Remarks

The PDFBookmark structure contains the properties of a single PDF bookmark. The collection of the bookmarks in a PDF file constitutes the Table of Contents (TOC) of the document. Typically, external viewers will load all the bookmarks of a document and generate this TOC. The viewer then allows the user to click on any entry in the TOC and perform the action of the bookmark.

The bookmarks and internal links of a PDF have a document (global) scope and are not part of any page. As a result, to read the bookmarks of a document, use the PDFDocument.ParseDocumentStructure method. Then access the PDFDocument.Bookmarks and PDFDocument.InternalLinks collections.

The bookmark has the following properties to represent its appearance:

  • Title: This is the text to appear to the user

  • Level: The bookmark indentation level. Level 0 is a root bookmark, level 1 is a child of the previous bookmark, level 2 is a child of the child and so on.

  • BookmarkStyle: The bookmark font style

The action of a bookmark consists of the following:

  • TargetPageNumber: This the 1-based integer to go to. External viewers should scroll to this page when this bookmark is activated

  • TargetPosition: The position in PDF units (1/72 of an inch and bottom-left) of the target page to scroll to. External viewers should scroll to this position when the bookmark is activated

  • TargetZoomPercent: The zoom percent (100 equals to no zoom) of the target page. External viewers should zoom to this value when the bookmark is activated

  • TargetPageFitType: The page fit type of the target page. External viewers should set the page view properties based on this value when this bookmark is activated

Example

For an example, refer to PDFDocument.ParseDocumentStructure.

Requirements

Target Platforms

Help Version 20.0.2020.4.3
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Pdf Assembly