op.document.deletePages
From PDF XChange PDF SDK
(→Sample) |
|||
Line 31: | Line 31: | ||
{ | { | ||
int nID = Inst.Str2ID("op.document.deletePages", false); | int nID = Inst.Str2ID("op.document.deletePages", false); | ||
− | PDFXEdit.IOperation | + | PDFXEdit.IOperation Op = Inst.CreateOp(nID); |
− | PDFXEdit.ICabNode input = | + | PDFXEdit.ICabNode input = Op.Params.Root["Input"]; |
input.v = Doc; | input.v = Doc; | ||
− | PDFXEdit.ICabNode options = | + | PDFXEdit.ICabNode options = Op.Params.Root["Options"]; |
options["PagesRange.Type"].v = "Exact"; | options["PagesRange.Type"].v = "Exact"; | ||
options["PagesRange.Text"].v = "1-3"; //Select pages range that will be deleted from the document | options["PagesRange.Text"].v = "1-3"; //Select pages range that will be deleted from the document | ||
− | + | Op.Do(); | |
} | } | ||
</pre> | </pre> |
Revision as of 01:04, 19 April 2016
Overview
The operation allows to delete pages.
Parameters
Name | Type | Description |
---|---|---|
Input | Array | Array of IUnknown -based objects containing the IPXC_Document which pages will be deleted.
|
Output | Array | Array of IUnknown -based objects containing the IPXC_Document which pages were deleted.
|
Options | Dictionary | Dictionary with options of the operation. |
Sample
//C# private void DeletePages(PDFXEdit.IPXV_Document Doc, PDFXEdit.PXV_Inst Inst) { int nID = Inst.Str2ID("op.document.deletePages", false); PDFXEdit.IOperation Op = Inst.CreateOp(nID); PDFXEdit.ICabNode input = Op.Params.Root["Input"]; input.v = Doc; PDFXEdit.ICabNode options = Op.Params.Root["Options"]; options["PagesRange.Type"].v = "Exact"; options["PagesRange.Text"].v = "1-3"; //Select pages range that will be deleted from the document Op.Do(); }