op.newBlankDoc

From PDF XChange PDF SDK
Jump to: navigation, search
 
(7 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 
[[Category:Editor]]
 
[[Category:Editor]]
 
{{#customTitle:op.newBlankDoc}}
 
{{#customTitle:op.newBlankDoc}}
{{#parentPage:PXV:Operations}}
+
{{#parentPage:PXV:Operations|op.newBlankDoc|operation}}
{{ToWrite}}
+
 
{{ToReview}}
 
{{ToReview}}
  
 
== Overview ==
 
== Overview ==
The operation overview...
+
The operation allows to create new PDF document.
  
 
== Parameters ==
 
== Parameters ==
Line 16: Line 15:
 
| class="op_param_name" | Input
 
| class="op_param_name" | Input
 
| style="text-align:center" | Array
 
| style="text-align:center" | Array
| Array of '''IUnknown'''-based objects.
+
| No input should be specified.
 
|-
 
|-
 
| class="op_param_name" | Output
 
| class="op_param_name" | Output
| style="text-align:center;" | Array
+
| style="text-align:center;" | IUnknown
| Array of '''IUnknown'''-based objects.
+
| <code>IUnknown</code>-based object containing the [[PXV:IPXC_Document|IPXC_Document]] that was created.
 
|-
 
|-
 
| class="op_param_name" | [[PXV:op_newBlankDoc_Options|Options]]
 
| class="op_param_name" | [[PXV:op_newBlankDoc_Options|Options]]
| style="text-align:center;" | Dictionary  
+
| style="text-align:center;" | Dictionary
 
| Dictionary with options of the operation.
 
| Dictionary with options of the operation.
 
|}
 
|}
  
 
+
== Sample ==
== Just for preview ==
+
<pre class="brush:c#">//C#
 
+
private void NewBlankDoc(PDFXEdit.IPXV_MainFrame mainFrm, PDFXEdit.IPXV_Inst Inst)
{| class="wikitable operation" style="width:85%;"
+
{
! style="width:60pt;" | '''Name'''
+
int nID = Inst.Str2ID("op.newBlankDoc", false);
! style="width:60pt;" | '''Type'''
+
PDFXEdit.IOperation Op = Inst.CreateOp(nID);
! '''Description'''
+
PDFXEdit.ICabNode options = Op.Params.Root["Options"];
|-
+
options["PaperType"].v = 1;
| style="padding:5pt;" | <tt>Input</tt>
+
options["StdPaperIndex"].v = 10; //B5
| style="text-align:center;padding:5pt;" | Array
+
options["Count"].v = 11;
| style="padding:5pt;" | Array of '''IUnknown'''-based objects.
+
Op.Do();
|-
+
PDFXEdit.IPXC_Document doc = (PDFXEdit.IPXC_Document)Op.Params.Root["Output"].v;
| style="padding:5pt;" | <tt>Output</tt>
+
//Opening document in the given main Frame
| style="text-align:center;padding:5pt;" | Array
+
mainFrm.OpenDocFrom(doc);
| style="padding:5pt;" | Array of '''IUnknown'''-based objects.
+
}
|-
+
</pre>
| style="padding:5pt;" | <tt>[[PXV:op_newBlankDoc_Options|Options]]</tt>
+
| style="padding:5pt;text-align:center;" | Dictionary
+
| style="padding:5pt;" | Dictionary with options of the operation.
+
|}
+

Latest revision as of 22:57, 20 April 2016


Overview

The operation allows to create new PDF document.

Parameters

Name Type Description
Input Array No input should be specified.
Output IUnknown IUnknown-based object containing the IPXC_Document that was created.
Options Dictionary Dictionary with options of the operation.

Sample

//C#
private void NewBlankDoc(PDFXEdit.IPXV_MainFrame mainFrm, PDFXEdit.IPXV_Inst Inst)
{
	int nID = Inst.Str2ID("op.newBlankDoc", false);
	PDFXEdit.IOperation Op = Inst.CreateOp(nID);
	PDFXEdit.ICabNode options = Op.Params.Root["Options"];
	options["PaperType"].v = 1;
	options["StdPaperIndex"].v = 10; //B5
	options["Count"].v = 11;
	Op.Do();
	PDFXEdit.IPXC_Document doc = (PDFXEdit.IPXC_Document)Op.Params.Root["Output"].v;
	//Opening document in the given main Frame
	mainFrm.OpenDocFrom(doc);
}