op.document.extractPages

From PDF XChange PDF SDK
Jump to: navigation, search
(Automatic page editing by robot)
 
Line 26: Line 26:
 
| Dictionary with options of the operation.
 
| Dictionary with options of the operation.
 
|}
 
|}
 +
 +
== Sample ==
 +
<pre class="brush:c#">//C#
 +
private void ExtractPages(PDFXEdit.IPXV_Document Doc, PDFXEdit.PXV_Inst Inst)
 +
{
 +
int nID = Inst.Str2ID("op.document.extractPages", 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 = "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
 +
pOp.Do();
 +
}
 +
</pre>

Revision as of 05:52, 9 January 2016


Overview

The operation overview...

Parameters

Name Type Description
Input Array Array of IUnknown-based objects.
Output Array Array of IUnknown-based objects.
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 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 = "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
	pOp.Do();
}