op.document.replacePages
From PDF XChange PDF SDK
(Label ToWrite removed) |
|||
Line 2: | Line 2: | ||
{{#customTitle:op.document.replacePages}} | {{#customTitle:op.document.replacePages}} | ||
{{#parentPage:PXV:Operations|op.document.replacePages|operation}} | {{#parentPage:PXV:Operations|op.document.replacePages|operation}} | ||
− | + | ||
{{ToReview}} | {{ToReview}} | ||
Revision as of 02:35, 1 March 2016
Overview
The operation allows you to replace a part of an active PDF document with a part of already opened PDF document or located in a destination folder file all supported formats.
Parameters
Name | Type | Description |
---|---|---|
Input | IUnknown | IUnknown -based object containing the IPXC_Document that will have it's pages changed.
|
Output | IUnknown | IUnknown -based object containing the IPXC_Document that had it's pages changed.
|
Options | Dictionary | Dictionary with options of the operation. |
Sample
//C# private void ReplacePages(PDFXEdit.IPXV_Document Doc, PDFXEdit.PXV_Inst Inst) { int nID = Inst.Str2ID("op.document.replacePages", 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 = "Exact"; options["PagesRange.Text"].v = "1-3"; //Selecting 1,2,3 pages from file options["CommentsAction"].v = 0; //Don't copy comments options["BookmarksAction"].v = 0; //Don`t copy bookmarks options["Position"].v = 1; //Start index of the source pages that will replace the document's pages options["PositionStop"].v = 3; //End index of the source pages that will replace the document's pages PDFXEdit.IAFS_Inst fsInst = (PDFXEdit.IAFS_Inst)Inst.GetExtension("AFS"); PDFXEdit.IAFS_Name destPath = fsInst.DefaultFileSys.StringToName("D:\\TestFile.pdf"); //Converting string to name options["Src"].v = destPath; //Source document pOp.Do(); }