op.document.addBarcode

From PDF XChange PDF SDK
Jump to: navigation, search
(Created page with "Category:Editor {{#customTitle:op.document.addBarcode}} {{#parentPage:PXV:Operations|op.document.addBarcode|operation}} {{ToWrite}} {{ToReview}} == Overview == The operat...")
 
 
(2 intermediate revisions by the same user not shown)
Line 2: Line 2:
 
{{#customTitle:op.document.addBarcode}}
 
{{#customTitle:op.document.addBarcode}}
 
{{#parentPage:PXV:Operations|op.document.addBarcode|operation}}
 
{{#parentPage:PXV:Operations|op.document.addBarcode|operation}}
{{ToWrite}}
 
 
{{ToReview}}
 
{{ToReview}}
  
 
== Overview ==
 
== Overview ==
The operation overview...
+
The operation allows to add a barcode on to the document's page as a stamp annotation or as a part of the page's content.
  
 
== 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.
+
| Specifies the [[PXV:IPXC_Document|IPXC_Document]] where the barcode should be inserted into.
 
|-
 
|-
 
| 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.
+
| Returns [[PXV:IPXC_Annotation|IPXC_Annotation]] if the barcode was placed as a stamp annotation or [[PXV:INumArray|INumArray]] if the barcode was placed as a part of the page's content.
 
|-
 
|-
 
| class="op_param_name" | [[PXV:op_document_addBarcode_Options|Options]]
 
| class="op_param_name" | [[PXV:op_document_addBarcode_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 AddBarcode(PDFXEdit.IPXV_Document Doc, PDFXEdit.IPXV_Inst Inst)
 +
{
 +
int nID = Inst.Str2ID("op.document.addBarcode", false);
 +
PDFXEdit.IOperation Op = Inst.CreateOp(nID);
 +
var input = Op.Params.Root["Input"];
 +
input.v = Doc.CoreDoc;
 +
PDFXEdit.ICabNode options = Op.Params.Root["Options"];
 +
options["Pos.left"].v = 100;
 +
options["Pos.right"].v = 200;
 +
options["Pos.bottom"].v = 100;
 +
options["Pos.top"].v = 200;
 +
options["AsStamp"].v = false;
 +
options["ECCLevel"].v = 4;
 +
options["Data"].v = "This is a test barcode data";
 +
Op.Do();
 +
}
 +
</pre>

Latest revision as of 00:25, 19 April 2016


Overview

The operation allows to add a barcode on to the document's page as a stamp annotation or as a part of the page's content.

Parameters

Name Type Description
Input IUnknown Specifies the IPXC_Document where the barcode should be inserted into.
Output IUnknown Returns IPXC_Annotation if the barcode was placed as a stamp annotation or INumArray if the barcode was placed as a part of the page's content.
Options Dictionary Dictionary with options of the operation.

Sample

//C#
private void AddBarcode(PDFXEdit.IPXV_Document Doc, PDFXEdit.IPXV_Inst Inst)
{
	int nID = Inst.Str2ID("op.document.addBarcode", false);
	PDFXEdit.IOperation Op = Inst.CreateOp(nID);
	var input = Op.Params.Root["Input"];
	input.v = Doc.CoreDoc;
	PDFXEdit.ICabNode options = Op.Params.Root["Options"];
	options["Pos.left"].v = 100;
	options["Pos.right"].v = 200;
	options["Pos.bottom"].v = 100;
	options["Pos.top"].v = 200;
	options["AsStamp"].v = false;
	options["ECCLevel"].v = 4;
	options["Data"].v = "This is a test barcode data";
	Op.Do();
}