op.bookmarks.setProps

From PDF XChange PDF SDK
Jump to: navigation, search


Overview

The operation allows to modify the bookmarks' properties.

Parameters

Name Type Description
Input Array Array of IUnknown-based objects containing the IPXC_Bookmark objects that need to be modified or the IPXC_Document object when all of the bookmarks must be modified. Note that all of the bookmarks must belong to one document.
Output Array Array of IUnknown-based objects containing the IPXC_Document from which the bookmarks were modified.
Options Dictionary Dictionary with options of the operation.

Sample

01//C#
02private void SetBookmarksTitle(PDFXEdit.IPXV_Document Doc, PDFXEdit.IPXV_Inst Inst)
03{
04    int nID = Inst.Str2ID("op.bookmarks.setProps", false);
05    PDFXEdit.IOperation Op = Inst.CreateOp(nID);
06    PDFXEdit.ICabNode input = Op.Params.Root["Input"];
07    input.Add().v = Doc.CoreDoc; //Select all of the bookmarks in document
08    PDFXEdit.ICabNode options = Op.Params.Root["Options"];
09    options["Mask"].v = 1; //Set edit title mask
10    options["Title"].v = "Bkm";//New title
11    Op.Do();
12}
13         
14private void SetBookmarksStyle(PDFXEdit.IPXV_Document Doc, PDFXEdit.IPXV_Inst Inst)
15{
16    int nID = Inst.Str2ID("op.bookmarks.setProps", false);
17    PDFXEdit.IOperation Op = Inst.CreateOp(nID);
18    PDFXEdit.ICabNode input = Op.Params.Root["Input"];
19    input.Add().v = Doc.CoreDoc;
20    PDFXEdit.ICabNode options = Op.Params.Root["Options"];
21    options["Mask"].v = 2; //Set edit style mask
22    options["Style"].v = 2;//Change style to bold
23    Op.Do();
24}