op.document.insertEmptyPages
From PDF XChange PDF SDK
(Automatic page editing by robot) |
|||
(3 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
{{#customTitle:op.document.insertEmptyPages}} | {{#customTitle:op.document.insertEmptyPages}} | ||
{{#parentPage:PXV:Operations|op.document.insertEmptyPages|operation}} | {{#parentPage:PXV:Operations|op.document.insertEmptyPages|operation}} | ||
− | |||
{{ToReview}} | {{ToReview}} | ||
== Overview == | == Overview == | ||
− | The operation | + | The operation allows to add empty pages with given size and orientation into the document. |
== Parameters == | == Parameters == | ||
Line 15: | Line 14: | ||
|- | |- | ||
| class="op_param_name" | Input | | class="op_param_name" | Input | ||
− | | style="text-align:center" | | + | | style="text-align:center" | IUnknown |
− | | | + | | <code>IUnknown</code>-based object containing the [[PXV:IPXC_Document|IPXC_Document]] where the empty pages will be added. |
|- | |- | ||
| class="op_param_name" | Output | | class="op_param_name" | Output | ||
− | | style="text-align:center;" | | + | | style="text-align:center;" | IUnknown |
− | | | + | | <code>IUnknown</code>-based object containing the [[PXV:IPXC_Document|IPXC_Document]] where the empty pages were added. |
|- | |- | ||
| class="op_param_name" | [[PXV:op_document_insertEmptyPages_Options|Options]] | | class="op_param_name" | [[PXV:op_document_insertEmptyPages_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 InsertEmptyPages(PDFXEdit.IPXV_Document Doc, PDFXEdit.PXV_Inst Inst) | ||
+ | { | ||
+ | int nID = Inst.Str2ID("op.document.insertEmptyPages", 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["PaperType"].v = 2; //Apply custom paper type | ||
+ | options["Count"].v = 4; //Create 4 new pages | ||
+ | options["Width"].v = 800; //Width of new pages | ||
+ | options["Height"].v = 1200; //Height of new pages | ||
+ | options["Location"].v = 1; //New pages will be inserted after first page | ||
+ | options["Position"].v = 0; //Page number | ||
+ | Op.Do(); | ||
+ | } | ||
+ | </pre> |
Latest revision as of 01:05, 19 April 2016
Overview
The operation allows to add empty pages with given size and orientation into the document.
Parameters
Name | Type | Description |
---|---|---|
Input | IUnknown | IUnknown -based object containing the IPXC_Document where the empty pages will be added.
|
Output | IUnknown | IUnknown -based object containing the IPXC_Document where the empty pages were added.
|
Options | Dictionary | Dictionary with options of the operation. |
Sample
//C# private void InsertEmptyPages(PDFXEdit.IPXV_Document Doc, PDFXEdit.PXV_Inst Inst) { int nID = Inst.Str2ID("op.document.insertEmptyPages", 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["PaperType"].v = 2; //Apply custom paper type options["Count"].v = 4; //Create 4 new pages options["Width"].v = 800; //Width of new pages options["Height"].v = 1200; //Height of new pages options["Location"].v = 1; //New pages will be inserted after first page options["Position"].v = 0; //Page number Op.Do(); }