op.annot.setData
From PDF XChange PDF SDK
(Automatic page editing by robot) |
(→Sample) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
{{#customTitle:op.annot.setData}} | {{#customTitle:op.annot.setData}} | ||
{{#parentPage:PXV:Operations|op.annot.setData|operation}} | {{#parentPage:PXV:Operations|op.annot.setData|operation}} | ||
− | |||
{{ToReview}} | {{ToReview}} | ||
== Overview == | == Overview == | ||
− | The operation | + | The operation allows to modify the [[PXV:IPXC_AnnotData|annotation data]] of the given annotation. |
== Parameters == | == Parameters == | ||
Line 16: | Line 15: | ||
| class="op_param_name" | Input | | class="op_param_name" | Input | ||
| style="text-align:center" | Array | | style="text-align:center" | Array | ||
− | | Array of <code>IUnknown</code>-based objects. | + | | Array of <code>IUnknown</code>-based objects containing the [[PXV:IPXC_Annotation|IPXC_Annotation]] that will have it's data modified. |
|- | |- | ||
| class="op_param_name" | Output | | class="op_param_name" | Output | ||
| style="text-align:center;" | Array | | style="text-align:center;" | Array | ||
− | | Array of <code>IUnknown</code>-based objects. | + | | Array of <code>IUnknown</code>-based objects containing the [[PXV:IPXC_Annotation|IPXC_Annotation]] that had it's data modified. |
|- | |- | ||
| class="op_param_name" | [[PXV:op_annot_setData_Options|Options]] | | class="op_param_name" | [[PXV:op_annot_setData_Options|Options]] | ||
Line 26: | Line 25: | ||
| Dictionary with options of the operation. | | Dictionary with options of the operation. | ||
|} | |} | ||
+ | |||
+ | == Sample == | ||
+ | <pre class="brush:c#">//C# | ||
+ | private void SetAnnotationData(PDFXEdit.IPXV_Document Doc, PDFXEdit.IPXV_Inst Inst, PDFXEdit.IPXC_Annotation Annotation) | ||
+ | { | ||
+ | //In this sample the Free Text Annotation is used | ||
+ | PDFXEdit.IPXC_AnnotData_FreeText FTData = (PDFXEdit.IPXC_AnnotData_FreeText)Annotation.Data; | ||
+ | FTData.Contents = "Test String"; | ||
+ | int nID = Inst.Str2ID("op.annot.setData", 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["NewData"].v = FTData; | ||
+ | Op.Do(); | ||
+ | } | ||
+ | </pre> |
Latest revision as of 06:28, 15 April 2016
Overview
The operation allows to modify the annotation data of the given annotation.
Parameters
Name | Type | Description |
---|---|---|
Input | Array | Array of IUnknown -based objects containing the IPXC_Annotation that will have it's data modified.
|
Output | Array | Array of IUnknown -based objects containing the IPXC_Annotation that had it's data modified.
|
Options | Dictionary | Dictionary with options of the operation. |
Sample
//C# private void SetAnnotationData(PDFXEdit.IPXV_Document Doc, PDFXEdit.IPXV_Inst Inst, PDFXEdit.IPXC_Annotation Annotation) { //In this sample the Free Text Annotation is used PDFXEdit.IPXC_AnnotData_FreeText FTData = (PDFXEdit.IPXC_AnnotData_FreeText)Annotation.Data; FTData.Contents = "Test String"; int nID = Inst.Str2ID("op.annot.setData", 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["NewData"].v = FTData; Op.Do(); }