Skip to content

Instantly share code, notes, and snippets.

@Polaringu
Last active December 16, 2015 07:52
Show Gist options
  • Save Polaringu/59e8fe51fea2b934a1e9 to your computer and use it in GitHub Desktop.
Save Polaringu/59e8fe51fea2b934a1e9 to your computer and use it in GitHub Desktop.
Resize pages operation code sample
//C#
private void ResizePageToA2(PDFXEdit.IPXV_Document pDoc, PDFXEdit.PXV_Inst pInst)
{
if (pDoc == null)
return;
int nID = pInst.Str2ID("op.document.resizePages", false);
PDFXEdit.IOperation pOp = pInst.CreateOp(nID);
PDFXEdit.ICabNode input = pOp.Params.Root["Input"];
input.v = pDoc;
PDFXEdit.ICabNode options = pOp.Params.Root["Options"];
options["PaperType"].v = 1; //Standard values table
options["StdPaperIndex"].v = 2; //A2
pOp.Do();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment