Options
From PDF XChange PDF SDK
(Automatic page editing by robot) |
|||
(One intermediate revision by the same user not shown) | |||
Line 2: | Line 2: | ||
{{#customTitle:Options}} | {{#customTitle:Options}} | ||
{{#parentPage:PXV:op_pdfNamedDests_rename|Options|property}} | {{#parentPage:PXV:op_pdfNamedDests_rename|Options|property}} | ||
− | |||
{{ToReview}} | {{ToReview}} | ||
Line 14: | Line 13: | ||
| class="op_param_name" | OldName | | class="op_param_name" | OldName | ||
| style="text-align:center" | String | | style="text-align:center" | String | ||
− | | Specifies | + | | Specifies an old name of the named destination. |
Default value: <tt>'''Empty String'''</tt> | Default value: <tt>'''Empty String'''</tt> | ||
|- | |- | ||
| class="op_param_name" | NewName | | class="op_param_name" | NewName | ||
| style="text-align:center" | String | | style="text-align:center" | String | ||
− | | Specifies | + | | Specifies a new name of the named destination. |
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(); } }