Options

From PDF XChange PDF SDK
Jump to: navigation, search


Options Table

Name Type Value
OldName String Specifies an old name of the named destination.

Default value: Empty String

NewName String Specifies a new name of the named destination.

Default value: Empty String

Sample

01//C#
02private void RenameNamedDestination(PDFXEdit.IPXV_Document Doc, PDFXEdit.IPXV_Inst Inst)
03{
04    int nID = Inst.Str2ID("op.pdfNamedDests.rename", false);
05    PDFXEdit.IOperation Op = Inst.CreateOp(nID);
06    var input = Op.Params.Root["Input"];
07    input.Add().v = Doc.CoreDoc;
08    PDFXEdit.ICabNode options = Op.Params.Root["Options"];
09    PDFXEdit.IPXC_NameTree Tree = Doc.CoreDoc.GetNameTree("Dests");
10    if (Tree.Count > 0)
11    {
12        options["OldName"].v = Tree.get_ItemName(0);
13        options["NewName"].v = "New Destination Name";
14        Op.Do();
15    }
16}