op.document.insertEmptyPages

From PDF XChange PDF SDK
Jump to: navigation, search


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

01//C#
02private void InsertEmptyPages(PDFXEdit.IPXV_Document Doc, PDFXEdit.PXV_Inst Inst)
03{
04    int nID = Inst.Str2ID("op.document.insertEmptyPages", false);
05    PDFXEdit.IOperation Op = Inst.CreateOp(nID);
06    PDFXEdit.ICabNode input = Op.Params.Root["Input"];
07    input.v = Doc;
08    PDFXEdit.ICabNode options = Op.Params.Root["Options"];
09    options["PaperType"].v = 2; //Apply custom paper type
10    options["Count"].v = 4; //Create 4 new pages
11    options["Width"].v = 800; //Width of new pages
12    options["Height"].v = 1200; //Height of new pages
13    options["Location"].v = 1; //New pages will be inserted after first page
14    options["Position"].v = 0; //Page number
15    Op.Do();
16}