op.newBlankDoc

From PDF XChange PDF SDK
Jump to: navigation, search
(Parameters)
 
(2 intermediate revisions by the same user not shown)
Line 2: Line 2:
 
{{#customTitle:op.newBlankDoc}}
 
{{#customTitle:op.newBlankDoc}}
 
{{#parentPage:PXV:Operations|op.newBlankDoc|operation}}
 
{{#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 26: Line 25:
 
| Dictionary with options of the operation.
 
| Dictionary with options of the operation.
 
|}
 
|}
 +
 +
== Sample ==
 +
<pre class="brush:c#">//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);
 +
}
 +
</pre>

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);
}