op.annots.delete
From PDF XChange PDF SDK
(Automatic page editing by robot) |
|||
Line 26: | Line 26: | ||
| Dictionary with options of the operation. | | Dictionary with options of the operation. | ||
|} | |} | ||
+ | |||
+ | == Sample == | ||
+ | <pre class="brush:c#">//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(); | ||
+ | } | ||
+ | </pre> |
Revision as of 04:11, 24 February 2016
Overview
The operation overview...
Parameters
Name | Type | Description |
---|---|---|
Input | Array | Array of IUnknown -based objects.
|
Output | Array | Array of IUnknown -based objects.
|
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(); }