ILabelerDriver interface : Print method

Print method
Description
VWorks software calls the Print method to tell the plugin to print a labware label using the data provided in the labelxml parameter. The plugin should not apply the label.
Syntax
 
HRESULT Print(
[in] BSTR *labelxml,
[out,retval] enum ReturnCode *retVal
);
Parameters
 
0 = The request was completed (RETURN_SUCCESS)
1 = Something was wrong with the input, so the request was not completed (RETURN_BAD_ARGS)
2 = The request was not completed (RETURN_FAIL)
Print method input
VWorks software passes a PrinterMetaData XML block into the labelxml parameter of the Print method.
PrinterMetaData XML block
The PrinterFormatMetaData XML block contains the PrinterMetaData element and all its children. This XML block provides the name of a label format, its associated field names, and the contents of each field, if any. The PrinterFormatMetaData XML block also tells the plugin not to apply the label.
XML format
The value of the file attribute for the Velocity11 element is MetaData. See “Velocity11 element” .
 
<PrinterMetaData>
<PrinterFormatMetaData>
<PrinterFormatMetaData>
<PrinterFieldMetaData>
<PrinterFieldMetaData />
...
</PrinterFieldMetaData>
</PrinterFormatMetaData>
</PrinterFormatMetaData>
</PrinterMetaData>
XML elements and attributes
See “PrinterMetaData XML block components” .
Example of Print method input
The following sample code is a PrinterMetaData XML block received by the plugin from VWorks software as a string in the labelxml parameter of the Print method. VWorks software tells the plugin to print the value barcode in the field named 1 using the label format named Name. The value of the Side attribute tells the plugin not to apply the label.
 
<PrinterMetaData >
<PrinterFormatMetaData >
<PrinterFormatMetaData Name='1' Side='No Apply' >
<PrinterFieldMetaData >
<PrinterFieldMetaData Name='1' Value='barcode' />
<PrinterFieldMetaData Name='2' />
<PrinterFieldMetaData Name='3' />
<PrinterFieldMetaData Name='4' />
<PrinterFieldMetaData Name='5' />
<PrinterFieldMetaData Name='6' />
</PrinterFieldMetaData>
</PrinterFormatMetaData>
</PrinterFormatMetaData>
</PrinterMetaData>
Related information