op.document.resizePages

From PDF XChange PDF SDK
Jump to: navigation, search
(Automatic page editing by robot)
 
(Sample)
 
(6 intermediate revisions by 2 users not shown)
Line 2: Line 2:
 
{{#customTitle:op.document.resizePages}}
 
{{#customTitle:op.document.resizePages}}
 
{{#parentPage:PXV:Operations|op.document.resizePages|operation}}
 
{{#parentPage:PXV:Operations|op.document.resizePages|operation}}
{{ToWrite}}
 
 
{{ToReview}}
 
{{ToReview}}
  
 
== Overview ==
 
== Overview ==
The operation overview...
+
The operation allows to change pages media box's values with or without scaling of the pages contents.
  
 
== Parameters ==
 
== Parameters ==
Line 15: Line 14:
 
|-
 
|-
 
| class="op_param_name" | Input
 
| class="op_param_name" | Input
| style="text-align:center" | Array
+
| style="text-align:center" | IUnknown
| Array of <code>IUnknown</code>-based objects.
+
| <code>IUnknown</code>-based object containing the [[PXV:IPXC_Document|IPXC_Document]] which pages will have their media box changed.
 
|-
 
|-
 
| class="op_param_name" | Output
 
| class="op_param_name" | Output
| style="text-align:center;" | Array
+
| style="text-align:center;" | IUnknown
| Array of <code>IUnknown</code>-based objects.
+
| <code>IUnknown</code>-based object containing the [[PXV:IPXC_Document|IPXC_Document]] which pages had their media box changed.
 
|-
 
|-
 
| class="op_param_name" | [[PXV:op_document_resizePages_Options|Options]]
 
| class="op_param_name" | [[PXV:op_document_resizePages_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 ResizePageToA2(PDFXEdit.IPXV_Document Doc, PDFXEdit.PXV_Inst Inst)
 +
{
 +
int nID = Inst.Str2ID("op.document.resizePages", 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 = 1; //Standard values table
 +
options["StdPaperIndex"].v = 2; //A2
 +
Op.Do();
 +
}
 +
</pre>

Latest revision as of 07:49, 20 April 2016


Overview

The operation allows to change pages media box's values with or without scaling of the pages contents.

Parameters

Name Type Description
Input IUnknown IUnknown-based object containing the IPXC_Document which pages will have their media box changed.
Output IUnknown IUnknown-based object containing the IPXC_Document which pages had their media box changed.
Options Dictionary Dictionary with options of the operation.

Sample

//C#
private void ResizePageToA2(PDFXEdit.IPXV_Document Doc, PDFXEdit.PXV_Inst Inst)
{
	int nID = Inst.Str2ID("op.document.resizePages", 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 = 1; //Standard values table
	options["StdPaperIndex"].v = 2; //A2
	Op.Do();
}