op.document.deletePages

From PDF XChange PDF SDK
Jump to: navigation, search
(Sample)
Line 31: Line 31:
 
{
 
{
 
int nID = Inst.Str2ID("op.document.deletePages", false);
 
int nID = Inst.Str2ID("op.document.deletePages", false);
PDFXEdit.IOperation pOp = Inst.CreateOp(nID);
+
PDFXEdit.IOperation Op = Inst.CreateOp(nID);
PDFXEdit.ICabNode input = pOp.Params.Root["Input"];
+
PDFXEdit.ICabNode input = Op.Params.Root["Input"];
 
input.v = Doc;
 
input.v = Doc;
PDFXEdit.ICabNode options = pOp.Params.Root["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
pOp.Do();
+
Op.Do();
 
}
 
}
 
</pre>
 
</pre>

Revision as of 02: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();
}