op.annots.move
From PDF XChange PDF SDK
(→Sample) |
|||
(4 intermediate revisions by 2 users not shown) | |||
Line 2: | Line 2: | ||
{{#customTitle:op.annots.move}} | {{#customTitle:op.annots.move}} | ||
{{#parentPage:PXV:Operations|op.annots.move|operation}} | {{#parentPage:PXV:Operations|op.annots.move|operation}} | ||
− | |||
{{ToReview}} | {{ToReview}} | ||
== Overview == | == Overview == | ||
− | The operation | + | The operation allows moving annotation by specified parameters. |
== Parameters == | == Parameters == | ||
Line 20: | Line 19: | ||
| class="op_param_name" | Output | | class="op_param_name" | Output | ||
| style="text-align:center;" | Array | | style="text-align:center;" | Array | ||
− | | | + | | If "Copy " parameters is true, then this array is an |
+ | array of <code>IUnknown</code>-based objects containing the [[PXV:IPXC_Annotation|IPXC_Annotation]] objects which created as result by copy operation. Otherwise it will be empty. | ||
|- | |- | ||
| class="op_param_name" | [[PXV:op_annots_move_Options|Options]] | | class="op_param_name" | [[PXV:op_annots_move_Options|Options]] | ||
Line 26: | Line 26: | ||
| Dictionary with options of the operation. | | Dictionary with options of the operation. | ||
|} | |} | ||
+ | |||
+ | == Sample == | ||
+ | <pre class="brush:c#">//C# | ||
+ | private void MoveAnnotation(PDFXEdit.IPXV_Document Doc, PDFXEdit.IPXV_Inst Inst, PDFXEdit.IPXC_Annotation Annotation) | ||
+ | { | ||
+ | int nID = Inst.Str2ID("op.annots.move", false); | ||
+ | PDFXEdit.IOperation Op = Inst.CreateOp(nID); | ||
+ | PDFXEdit.ICabNode input = Op.Params.Root["Input"]; | ||
+ | input.Add().v = Annotation; | ||
+ | PDFXEdit.ICabNode options = Op.Params.Root["Options"]; | ||
+ | //Moving inside the same document | ||
+ | options["NewDoc"].v = Doc; | ||
+ | options["NewPageIndex"].v = 3; | ||
+ | options["Copy"].v = true; | ||
+ | Op.Do(); | ||
+ | } | ||
+ | </pre> |
Latest revision as of 06:30, 15 April 2016
Overview
The operation allows moving annotation by specified parameters.
Parameters
Name | Type | Description |
---|---|---|
Input | Array | Array of IUnknown -based objects containing the IPXC_Annotation objects that need to be moved or copied. Note that all of the annotations must belong to one page in one document.
|
Output | Array | If "Copy " parameters is true, then this array is an
array of |
Options | Dictionary | Dictionary with options of the operation. |
Sample
//C# private void MoveAnnotation(PDFXEdit.IPXV_Document Doc, PDFXEdit.IPXV_Inst Inst, PDFXEdit.IPXC_Annotation Annotation) { int nID = Inst.Str2ID("op.annots.move", false); PDFXEdit.IOperation Op = Inst.CreateOp(nID); PDFXEdit.ICabNode input = Op.Params.Root["Input"]; input.Add().v = Annotation; PDFXEdit.ICabNode options = Op.Params.Root["Options"]; //Moving inside the same document options["NewDoc"].v = Doc; options["NewPageIndex"].v = 3; options["Copy"].v = true; Op.Do(); }