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.

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

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

def AppendBookmark(self, Title, Depth, Page, Zoom, Expanded)





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

function AppendBookmark($Title, $Depth, $Page, $Zoom, $Expanded) 





BclPrcResult AppendBookmark(BclPDFProcessorHandle* pHandle,
                            const wchar_t* Title,
                            int Depth,
                            int Page,
                            BclPrcZoomType Zoom,
                            BclBool Expanded);
Sub AppendBookmark(Title As String, _
                   Depth As Long, _
                   Page As Long, _
                   Zoom As prcZoomType, _
                   Expanded As Boolean)

bepproc +Bookmark -caption <string>
                  [-depth <int>]
                  [-page <int>]
                  [-zoom actual|fitPage|fitHeight|fitWidth|inherit]
                  [-expanded [on|off]]

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();