op.document.deletePages

From PDF XChange PDF SDK
Jump to: navigation, search
(Parameters)
 
(4 intermediate revisions by the same user not shown)
Line 2: Line 2:
 
{{#customTitle:op.document.deletePages}}
 
{{#customTitle:op.document.deletePages}}
 
{{#parentPage:PXV:Operations|op.document.deletePages|operation}}
 
{{#parentPage:PXV:Operations|op.document.deletePages|operation}}
{{ToWrite}}
 
 
{{ToReview}}
 
{{ToReview}}
  
Line 15: Line 14:
 
|-
 
|-
 
| class="op_param_name" | Input
 
| class="op_param_name" | Input
| style="text-align:center" | Array
+
| style="text-align:center" | IUnknown
| Array of <code>IUnknown</code>-based objects containing the [[PXV:IPXC_Document|IPXC_Document]] which pages will be delete.
+
| Specifies an [[PXV:IPXC_Document|IPXC_Document]] that will have it's pages deleted.
 
|-
 
|-
 
| class="op_param_name" | Output
 
| class="op_param_name" | Output
| style="text-align:center;" | Array
+
| style="text-align:center;" | IUnknown
| Array of <code>IUnknown</code>-based objects containing the [[PXV:IPXC_Document|IPXC_Document]] which pages were delete.
+
| Specifies an [[PXV:IPXC_Document|IPXC_Document]] that had it's pages deleted.
 
|-
 
|-
 
| class="op_param_name" | [[PXV:op_document_deletePages_Options|Options]]
 
| class="op_param_name" | [[PXV:op_document_deletePages_Options|Options]]
Line 26: Line 25:
 
| 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 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();
 +
}
 +
</pre>

Latest revision as of 00:06, 5 July 2018


Overview

The operation allows to delete pages.

Parameters

Name Type Description
Input IUnknown Specifies an IPXC_Document that will have it's pages deleted.
Output IUnknown Specifies an IPXC_Document that had it's pages 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();
}