BCL easyPDF SDK
easyPDF SDK Usermanual
PDF Creator Programming API  |  Download Free Trial  |  Contact Us to Purchase

AppendBookmark Method

Append a bookmark to a PDF file.

Sub AppendBookmark(Title As String,
                   Depth As Long,
                   Page As Long,
                   Zoom As prcZoomType,
                   Expanded As Boolean)

void AppendBookmark(string Title,
                    int Depth,
                    int Page,
                    prcZoomType Zoom,
                    bool Expanded)

void AppendBookmark(String Title,
                    int Depth,
                    int Page,
                    prcZoomType Zoom,
                    boolean Expanded) throws PDFProcessorException

Parameters

Return Values

N/A.

Remarks

  1. The bookmark depth uses zero-based index, meaning that depth starts from 0.
  2. The page number uses zero-based index, meaning that page number starts from 0.

Example Usage in VBScript

Set oProcessor = CreateObject("easyPDF.PDFProcessor.8")

Set oProcessorHandle = oProcessor.OpenFile("C:\test\input.pdf", "C:\test\output.pdf")

oProcessorHandle.AppendBookmark "Depth 0 linking to first page", _
                                0, _
                                0, _
                                PRC_ZOOMTYPE_FIT_PAGE, _
                                True
 
oProcessorHandle.AppendBookmark "Depth 1 linking to first page", _
                                1, _
                                0, _
                                PRC_ZOOMTYPE_FIT_PAGE, _
                                True
oProcessorHandle.Close

Example Usage in VB.NET

Dim oProcessor As PDFProcessor = New PDFProcessor
Dim oProcessorHandle As PDFProcessorHandle = oProcessor.OpenFile("C:\test\input.pdf", "C:\test\output.pdf")
   oProcessorHandle.AppendBookmark("Depth 0 linking to first page", _
                                   0, _
                                   0, _
                                   prcZoomType.PRC_ZOOMTYPE_FIT_PAGE, _
                                   True)
   oProcessorHandle.AppendBookmark("Depth 1 linking to first page", _
                                   1, _
                                   0, _
                                   prcZoomType.PRC_ZOOMTYPE_FIT_PAGE, _
                                   True)
oProcessorHandle.Close()

Example Usage in C#

PDFProcessor oProcessor = new PDFProcessor();
PDFProcessorHandle oProcessorHandle = oProcessor.OpenFile(@"C:\test\input.pdf", @"C:\test\output.pdf", null);
   oProcessorHandle.AppendBookmark("Depth 0 linking to first page", 
                                   0,
                                   0, 
                                   prcZoomType.PRC_ZOOMTYPE_FIT_PAGE, 
                                   true);
   oProcessorHandle.AppendBookmark("Depth 1 linking to first page", 
                                   1, 
                                   0, 
                                   prcZoomType.PRC_ZOOMTYPE_FIT_PAGE, 
                                   true);
oProcessorHandle.Close();