op.document.deletePages

From PDF XChange PDF SDK
Jump to: navigation, search
Line 16: Line 16:
 
| 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 containing the [[PXV:IPXC_Document|IPXC_Document]] which pages will be delete.
+
| Array of <code>IUnknown</code>-based objects containing the [[PXV:IPXC_Document|IPXC_Document]] which pages will be deleted.
 
|-
 
|-
 
| 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 containing the [[PXV:IPXC_Document|IPXC_Document]] which pages were delete.
+
| Array of <code>IUnknown</code>-based objects containing the [[PXV:IPXC_Document|IPXC_Document]] which pages were deleted.
 
|-
 
|-
 
| class="op_param_name" | [[PXV:op_document_deletePages_Options|Options]]
 
| class="op_param_name" | [[PXV:op_document_deletePages_Options|Options]]
Line 26: Line 26:
 
| Dictionary with options of the operation.
 
| Dictionary with options of the operation.
 
|}
 
|}
 +
 +
== Sample ==
 +
<pre class="brush:c#">//C#
 +
private void DeletePages(PDFXEdit.IPXV_Document Doc, PDFXEdit.PXV_Inst Inst)
 +
{
 +
int nID = Inst.Str2ID("op.document.deletePages", false);
 +
PDFXEdit.IOperation pOp = Inst.CreateOp(nID);
 +
PDFXEdit.ICabNode input = pOp.Params.Root["Input"];
 +
input.v = Doc;
 +
PDFXEdit.ICabNode options = pOp.Params.Root["Options"];
 +
options["PagesRange.Type"].v = "Exact";
 +
options["PagesRange.Text"].v = "1-3"; //Select pages range that will be deleted from the document
 +
pOp.Do();
 +
}
 +
</pre>

Revision as of 05:10, 9 January 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 pOp = Inst.CreateOp(nID);
	PDFXEdit.ICabNode input = pOp.Params.Root["Input"];
	input.v = Doc;
	PDFXEdit.ICabNode options = pOp.Params.Root["Options"];
	options["PagesRange.Type"].v = "Exact";
	options["PagesRange.Text"].v = "1-3"; //Select pages range that will be deleted from the document
	pOp.Do();
}