Options
From PDF XChange PDF SDK
Line 21: | Line 21: | ||
Default value: <tt>'''Empty String'''</tt> | Default value: <tt>'''Empty String'''</tt> | ||
|} | |} | ||
+ | |||
+ | == Sample == | ||
+ | <pre class="brush:c#">//C# | ||
+ | private void RenameNamedDestination(PDFXEdit.IPXV_Document Doc, PDFXEdit.IPXV_Inst Inst) | ||
+ | { | ||
+ | int nID = Inst.Str2ID("op.pdfNamedDests.rename", false); | ||
+ | PDFXEdit.IOperation Op = Inst.CreateOp(nID); | ||
+ | var input = Op.Params.Root["Input"]; | ||
+ | input.Add().v = Doc.CoreDoc; | ||
+ | PDFXEdit.ICabNode options = Op.Params.Root["Options"]; | ||
+ | PDFXEdit.IPXC_NameTree Tree = Doc.CoreDoc.GetNameTree("Dests"); | ||
+ | if (Tree.Count > 0) | ||
+ | { | ||
+ | options["OldName"].v = Tree.get_ItemName(0); | ||
+ | options["NewName"].v = "New Destination Name"; | ||
+ | Op.Do(); | ||
+ | } | ||
+ | } | ||
+ | </pre> |
Latest revision as of 06:19, 21 April 2016
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
//C# private void RenameNamedDestination(PDFXEdit.IPXV_Document Doc, PDFXEdit.IPXV_Inst Inst) { int nID = Inst.Str2ID("op.pdfNamedDests.rename", false); PDFXEdit.IOperation Op = Inst.CreateOp(nID); var input = Op.Params.Root["Input"]; input.Add().v = Doc.CoreDoc; PDFXEdit.ICabNode options = Op.Params.Root["Options"]; PDFXEdit.IPXC_NameTree Tree = Doc.CoreDoc.GetNameTree("Dests"); if (Tree.Count > 0) { options["OldName"].v = Tree.get_ItemName(0); options["NewName"].v = "New Destination Name"; Op.Do(); } }