op.annots.delete
From PDF XChange PDF SDK
Line 2: | Line 2: | ||
{{#customTitle:op.annots.delete}} | {{#customTitle:op.annots.delete}} | ||
{{#parentPage:PXV:Operations|op.annots.delete|operation}} | {{#parentPage:PXV:Operations|op.annots.delete|operation}} | ||
− | |||
{{ToReview}} | {{ToReview}} | ||
== Overview == | == Overview == | ||
− | The operation | + | The operation allows to delete annotations from the document. |
== 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]] objects that need to be deleted. Also the [[PXV:IPXC_Document|IPXC_Document]] can be specified - that will mean that all of the annotations will be deleted. Note that all of the annotations must belong to one document. |
|- | |- | ||
| 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_Document|IPXC_Document]] which annotations were deleted. |
|- | |- | ||
| class="op_param_name" | [[PXV:op_annots_delete_Options|Options]] | | class="op_param_name" | [[PXV:op_annots_delete_Options|Options]] |
Revision as of 05:32, 2 March 2016
Overview
The operation allows to delete annotations from the document.
Parameters
Name | Type | Description |
---|---|---|
Input | Array | Array of IUnknown -based objects containing the IPXC_Annotation objects that need to be deleted. Also the IPXC_Document can be specified - that will mean that all of the annotations will be deleted. Note that all of the annotations must belong to one document.
|
Output | Array | Array of IUnknown -based objects containing the IPXC_Document which annotations were deleted.
|
Options | Dictionary | Dictionary with options of the operation. |
Sample
//C# private void RemoveSquareAnnotations(PDFXEdit.IPXV_Document Doc, PDFXEdit.PXV_Inst Inst) { PDFXEdit.IPXS_Inst pSInt = (PDFXEdit.IPXS_Inst)pdfCtl.Inst.GetExtension("PXS"); uint nSquareAtom = pSInt.StrToAtom("Square"); int nID = pdfCtl.Inst.Str2ID("op.annots.delete", false); PDFXEdit.IOperation Op = pdfCtl.Inst.CreateOp(nID); PDFXEdit.ICabNode input = Op.Params.Root["Input"]; //Filling the operation with the annotations of Square type PDFXEdit.IPXV_AnnotsList annotsList = Inst.CreateAnnotsList(); for (uint i = 0; i < Doc.CoreDoc.Pages.Count; i++) { PDFXEdit.IPXC_Page page = Doc.CoreDoc.Pages[i]; uint nCnt = page.GetAnnotsCount(); for (uint j = 0; j < nCnt; j++) { PDFXEdit.IPXC_Annotation annot = page.GetAnnot(j); if (annot.Type == nSquareAtom) input.Add().v = annot; } } Op.Do(); }