op.document.extractPages

From PDF XChange PDF SDK
Jump to: navigation, search
(Sample)
 
(One intermediate revision by the same user not shown)
Line 2: Line 2:
 
{{#customTitle:op.document.extractPages}}
 
{{#customTitle:op.document.extractPages}}
 
{{#parentPage:PXV:Operations|op.document.extractPages|operation}}
 
{{#parentPage:PXV:Operations|op.document.extractPages|operation}}
{{ToWrite}}
 
 
{{ToReview}}
 
{{ToReview}}
  
 
== Overview ==
 
== Overview ==
The operation overview...
+
The operation allows to extract pages form the input document into newly created PDF document.
  
 
== Parameters ==
 
== Parameters ==
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.
+
| <code>IUnknown</code>-based object containing the [[PXV:IPXC_Document|IPXC_Document]] which pages will be extracted.
 
|-
 
|-
 
| 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.
+
| <code>IUnknown</code>-based object containing the [[PXV:IPXC_Document|IPXC_Document]] that was created from the extracted pages.
 
|-
 
|-
 
| class="op_param_name" | [[PXV:op_document_extractPages_Options|Options]]
 
| class="op_param_name" | [[PXV:op_document_extractPages_Options|Options]]
Line 32: Line 31:
 
{
 
{
 
int nID = Inst.Str2ID("op.document.extractPages", false);
 
int nID = Inst.Str2ID("op.document.extractPages", 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 = "All";
 
options["PagesRange.Type"].v = "All";
 
options["PagesRange.Filter"].v = "Even"; //Extract all even pages
 
options["PagesRange.Filter"].v = "Even"; //Extract all even pages
Line 45: Line 44:
 
options["LocalFolder"].v = "D:\\TestFolder\\"; //Output folder
 
options["LocalFolder"].v = "D:\\TestFolder\\"; //Output folder
 
options["OpenFolder"].v = true; //Open folder with new documents
 
options["OpenFolder"].v = true; //Open folder with new documents
pOp.Do();
+
Op.Do();
 
}
 
}
 
</pre>
 
</pre>

Latest revision as of 02:04, 19 April 2016


Overview

The operation allows to extract pages form the input document into newly created PDF document.

Parameters

Name Type Description
Input IUnknown IUnknown-based object containing the IPXC_Document which pages will be extracted.
Output IUnknown IUnknown-based object containing the IPXC_Document that was created from the extracted pages.
Options Dictionary Dictionary with options of the operation.

Sample

//C#
private void ExtractPages(PDFXEdit.IPXV_Document Doc, PDFXEdit.PXV_Inst Inst)
{
	int nID = Inst.Str2ID("op.document.extractPages", 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 = "All";
	options["PagesRange.Filter"].v = "Even"; //Extract all even pages
	options["CommentsAction"].v = 0; //Do not copy comments
	options["BookmarksAction"].v = 1; //Copy all bookmarks
	options["DeletePages"].v = true; //Delete extracting pages
	options["ExtractPagesAction"].v = 2; //Extract each page to another file
	options["FileName"].v = "%[Page]%[FileName]"; //Save new documents by this template
	options["LocalFolder"].v = "D:\\TestFolder\\"; //Output folder
	options["OpenFolder"].v = true; //Open folder with new documents
	Op.Do();
}