op.annots.duplicate
From PDF XChange PDF SDK
(→Sample) |
|||
(One intermediate revision by the same user not shown) | |||
Line 25: | Line 25: | ||
| Dictionary with options of the operation. | | Dictionary with options of the operation. | ||
|} | |} | ||
+ | |||
+ | == Sample == | ||
+ | <pre class="brush:c#">//C# | ||
+ | private void DuplicateAnnotation(PDFXEdit.IPXV_Document Doc, PDFXEdit.IPXV_Inst Inst, PDFXEdit.IPXC_Annotation Annotation) | ||
+ | { | ||
+ | int nID = Inst.Str2ID("op.annots.duplicate", 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"]; | ||
+ | options["NumberOfDuplicates"].v = 3; | ||
+ | options["VOffset"].v = 10; | ||
+ | options["PageOffset"].v = 1; | ||
+ | Op.Do(); | ||
+ | } | ||
+ | </pre> |
Latest revision as of 06:29, 15 April 2016
Overview
The operation allows to create duplicates from the annotations.
Parameters
Name | Type | Description |
---|---|---|
Input | Array | Array of IUnknown -based objects containing the IPXC_Annotation objects that need to be duplicated. Note that all of the annotations must belong to one document.
|
Output | Array | Array of IUnknown -based objects containing the IPXC_Document which the annotations were duplicated from. Not yet implemented.
|
Options | Dictionary | Dictionary with options of the operation. |
Sample
//C# private void DuplicateAnnotation(PDFXEdit.IPXV_Document Doc, PDFXEdit.IPXV_Inst Inst, PDFXEdit.IPXC_Annotation Annotation) { int nID = Inst.Str2ID("op.annots.duplicate", 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"]; options["NumberOfDuplicates"].v = 3; options["VOffset"].v = 10; options["PageOffset"].v = 1; Op.Do(); }