Class PrintJob
Specifies information about how a thermal label is printed, including the printer device settings, label orientation, number of copies, etc.
Inheritance
Inherited Members
Namespace: Neodynamic.SDK.Printing
Assembly: cs.temp.dll.dll
Syntax
public class PrintJob : IDisposable
Constructors
PrintJob()
Initializes a new instance of the PrintJob class
Declaration
public PrintJob()
Properties
CommandsOptimizationEnabled
Gets or sets whether optimization mechanisms are performed when generating the printer commands. Default is true.
Declaration
public bool CommandsOptimizationEnabled { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Copies
Gets or sets the number of copies of the thermal label to print. Default value is 1
Declaration
public int Copies { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Dpi
Gets or sets the printer DPI resolution. Default is 203
Declaration
public int Dpi { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
ExpressionEngine
Gets or sets the ExpressionEngine object. Default value is Null
Declaration
public ExpressionEngine ExpressionEngine { get; set; }
Property Value
Type | Description |
---|---|
ExpressionEngine |
FingerprintSettings
Gets the Fingerprint custom settings.
Declaration
public FingerprintSettings FingerprintSettings { get; }
Property Value
Type | Description |
---|---|
FingerprintSettings |
PrintOrientation
Gets or sets the page orientation used to print the thermal label. Default value is Portrait
Declaration
public PrintOrientation PrintOrientation { get; set; }
Property Value
Type | Description |
---|---|
PrintOrientation |
ProgrammingLanguage
Gets or sets the printer programming language. Default is ZPL
Declaration
public ProgrammingLanguage ProgrammingLanguage { get; set; }
Property Value
Type | Description |
---|---|
ProgrammingLanguage |
Replicates
Gets or sets the number of replicates of the thermal label to print. Default value is 0 (zero)
Declaration
public int Replicates { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
ThermalLabel
Gets or sets the ThermalLabel object to be printed out. Default value is Null
Declaration
public ThermalLabel ThermalLabel { get; set; }
Property Value
Type | Description |
---|---|
ThermalLabel |
Methods
Dispose()
Declaration
public void Dispose()
Implements
ExportToHtml(ThermalLabel, Stream, ImageSettings, Double, String)
Exports and saves this PrintJob and the specified ThermalLabel object with the specified ImageSettings to the specified Stream object in HTML format.
Declaration
public void ExportToHtml(ThermalLabel thermalLabel, Stream stream, ImageSettings imgSettings, double dpi, string title)
Parameters
Type | Name | Description |
---|---|---|
ThermalLabel | thermalLabel | The ThermalLabel object. |
Stream | stream | The Stream object to which to save the HTML document. |
ImageSettings | imgSettings | The ImageSettings object. |
System.Double | dpi | The resolution for the output image in the HTML document. |
System.String | title | The Title for the HTML document. If empty, then the HTML markup will contain the BODY content only. |
ExportToHtml(ThermalLabel, Stream, Double, String)
Exports and saves this PrintJob and specified ThermalLabel object to the specified Stream object in HTML format.
Declaration
public void ExportToHtml(ThermalLabel thermalLabel, Stream stream, double dpi, string title)
Parameters
Type | Name | Description |
---|---|---|
ThermalLabel | thermalLabel | The ThermalLabel object. |
Stream | stream | The Stream object to which to save the HTML document. |
System.Double | dpi | The resolution for the output image in the HTML document. |
System.String | title | The Title for the HTML document. If empty, then the HTML markup will contain the BODY content only. |
ExportToHtml(ThermalLabel, String, ImageSettings, Double, String)
Exports and saves this PrintJob and the specified ThermalLabel object with the specified ImageSettings to the specified file in HTML format.
Declaration
public void ExportToHtml(ThermalLabel thermalLabel, string pathFile, ImageSettings imgSettings, double dpi, string title)
Parameters
Type | Name | Description |
---|---|---|
ThermalLabel | thermalLabel | The ThermalLabel object. |
System.String | pathFile | A string that contains the name of the file to which to save the HTML document. |
ImageSettings | imgSettings | The ImageSettings object. |
System.Double | dpi | The resolution for the output image in the HTML document. |
System.String | title | The Title for the HTML document. If empty, then the HTML markup will contain the BODY content only. |
ExportToHtml(ThermalLabel, String, Double, String)
Exports and saves this PrintJob and the specified ThermalLabel object to the specified file in HTML format.
Declaration
public void ExportToHtml(ThermalLabel thermalLabel, string pathFile, double dpi, string title)
Parameters
Type | Name | Description |
---|---|---|
ThermalLabel | thermalLabel | The ThermalLabel object. |
System.String | pathFile | A string that contains the name of the file to which to save the HTML document. |
System.Double | dpi | The resolution for the output image in the HTML document. |
System.String | title | The Title for the HTML document. If empty, then the HTML markup will contain the BODY content only. |
ExportToHtml(Stream, ImageSettings, Double, String)
Exports and saves this PrintJob and ThermalLabel object with the specified ImageSettings to the specified Stream object in HTML format.
Declaration
public void ExportToHtml(Stream stream, ImageSettings imgSettings, double dpi, string title)
Parameters
Type | Name | Description |
---|---|---|
Stream | stream | The Stream object to which to save the HTML document. |
ImageSettings | imgSettings | The ImageSettings object. |
System.Double | dpi | The resolution for the output image in the HTML document. |
System.String | title | The Title for the HTML document. If empty, then the HTML markup will contain the BODY content only. |
ExportToHtml(Stream, Double, String)
Exports and saves this PrintJob and ThermalLabel object to the specified Stream object in HTML format.
Declaration
public void ExportToHtml(Stream stream, double dpi, string title)
Parameters
Type | Name | Description |
---|---|---|
Stream | stream | The Stream object to which to save the HTML document. |
System.Double | dpi | The resolution for the output image in the HTML document. |
System.String | title | The Title for the HTML document. If empty, then the HTML markup will contain the BODY content only. |
ExportToHtml(String, ImageSettings, Double, String)
Exports and saves this PrintJob and ThermalLabel object with the specified ImageSettings to the specified file in HTML format.
Declaration
public void ExportToHtml(string pathFile, ImageSettings imgSettings, double dpi, string title)
Parameters
Type | Name | Description |
---|---|---|
System.String | pathFile | A string that contains the name of the file to which to save the HTML document. |
ImageSettings | imgSettings | The ImageSettings object. |
System.Double | dpi | The resolution for the output image in the HTML document. |
System.String | title | The Title for the HTML document. If empty, then the HTML markup will contain the BODY content only. |
ExportToHtml(String, Double, String)
Exports and saves this PrintJob and ThermalLabel object to the specified file in HTML format.
Declaration
public void ExportToHtml(string pathFile, double dpi, string title)
Parameters
Type | Name | Description |
---|---|---|
System.String | pathFile | A string that contains the name of the file to which to save the HTML document. |
System.Double | dpi | The resolution for the output image in the HTML document. |
System.String | title | The Title for the HTML document. If empty, then the HTML markup will contain the BODY content only. |
ExportToImage(ThermalLabel, Stream, ImageSettings, Double)
Exports and saves this PrintJob and ThermalLabel object to the specified Stream object and image settings.
Declaration
public void ExportToImage(ThermalLabel thermalLabel, Stream stream, ImageSettings imgSettings, double dpi)
Parameters
Type | Name | Description |
---|---|---|
ThermalLabel | thermalLabel | The ThermalLabel object. |
Stream | stream | The Stream object to which to save the output image. |
ImageSettings | imgSettings | The ImageSettings object. |
System.Double | dpi | The resolution for the output image. |
ExportToImage(ThermalLabel, String, ImageSettings, Double)
Exports and saves this PrintJob and ThermalLabel object to the specified file and image settings.
Declaration
public void ExportToImage(ThermalLabel thermalLabel, string pathFile, ImageSettings imgSettings, double dpi)
Parameters
Type | Name | Description |
---|---|---|
ThermalLabel | thermalLabel | The ThermalLabel object. |
System.String | pathFile | A string that contains the name of the file to which to save the output image. |
ImageSettings | imgSettings | The ImageSettings object. |
System.Double | dpi | The resolution for the output image. |
ExportToImage(Stream, ImageSettings, Double)
Exports and saves this PrintJob to the specified Stream object and image settings.
Declaration
public void ExportToImage(Stream stream, ImageSettings imgSettings, double dpi)
Parameters
Type | Name | Description |
---|---|---|
Stream | stream | The Stream object to which to save the output image. |
ImageSettings | imgSettings | The ImageSettings object. |
System.Double | dpi | The resolution for the output image. |
ExportToImage(String, ImageSettings, Double)
Exports and saves this PrintJob to the specified file and image settings.
Declaration
public void ExportToImage(string pathFile, ImageSettings imgSettings, double dpi)
Parameters
Type | Name | Description |
---|---|---|
System.String | pathFile | A string that contains the name of the file to which to save the output image. |
ImageSettings | imgSettings | The ImageSettings object. |
System.Double | dpi | The resolution for the output image. |
ExportToPdf(ThermalLabel, Stream, Double)
Exports and saves this PrintJob and ThermalLabel object to the specified Stream object in PDF format.
Declaration
public void ExportToPdf(ThermalLabel thermalLabel, Stream stream, double dpi)
Parameters
Type | Name | Description |
---|---|---|
ThermalLabel | thermalLabel | The ThermalLabel object. |
Stream | stream | The Stream object to which to save the output image in PDF format. |
System.Double | dpi | The resolution for the output image in the PDF Stream. |
ExportToPdf(ThermalLabel, Stream, Double, PdfMetadata)
Exports and saves this PrintJob and ThermalLabel object to the specified Stream object in PDF format and metadata.
Declaration
public void ExportToPdf(ThermalLabel thermalLabel, Stream stream, double dpi, PdfMetadata metadata)
Parameters
Type | Name | Description |
---|---|---|
ThermalLabel | thermalLabel | The ThermalLabel object. |
Stream | stream | The Stream object to which to save the output image in PDF format. |
System.Double | dpi | The resolution for the output image in the PDF Stream. |
PdfMetadata | metadata | The PDF Metadata. |
ExportToPdf(ThermalLabel, String, Double)
Exports and saves this PrintJob and ThermalLabel object to the specified PDF file.
Declaration
public void ExportToPdf(ThermalLabel thermalLabel, string pathFile, double dpi)
Parameters
Type | Name | Description |
---|---|---|
ThermalLabel | thermalLabel | The ThermalLabel object. |
System.String | pathFile | A string that contains the name of the PDF file to which to save the output image. |
System.Double | dpi | The resolution for the output image in the PDF file. |
ExportToPdf(ThermalLabel, String, Double, PdfMetadata)
Exports and saves this PrintJob and ThermalLabel object to the specified PDF file and metadata.
Declaration
public void ExportToPdf(ThermalLabel thermalLabel, string pathFile, double dpi, PdfMetadata metadata)
Parameters
Type | Name | Description |
---|---|---|
ThermalLabel | thermalLabel | The ThermalLabel object. |
System.String | pathFile | A string that contains the name of the PDF file to which to save the output image. |
System.Double | dpi | The resolution for the output image in the PDF file. |
PdfMetadata | metadata | The PDF Metadata. |
ExportToPdf(Stream, Double)
Exports and saves this PrintJob to the specified Stream object in PDF format.
Declaration
public void ExportToPdf(Stream stream, double dpi)
Parameters
Type | Name | Description |
---|---|---|
Stream | stream | The Stream object to which to save the output image in PDF format. |
System.Double | dpi | The resolution for the output image in the PDF Stream. |
ExportToPdf(Stream, Double, PdfMetadata)
Exports and saves this PrintJob to the specified Stream object in PDF format and metadata.
Declaration
public void ExportToPdf(Stream stream, double dpi, PdfMetadata metadata)
Parameters
Type | Name | Description |
---|---|---|
Stream | stream | The Stream object to which to save the output image in PDF format. |
System.Double | dpi | The resolution for the output image in the PDF Stream. |
PdfMetadata | metadata | The PDF Metadata. |
ExportToPdf(String, Double)
Exports and saves this PrintJob to the specified PDF file.
Declaration
public void ExportToPdf(string pathFile, double dpi)
Parameters
Type | Name | Description |
---|---|---|
System.String | pathFile | A string that contains the name of the PDF file to which to save the output image. |
System.Double | dpi | The resolution for the output image in the PDF file. |
ExportToPdf(String, Double, PdfMetadata)
Exports and saves this PrintJob to the specified PDF file and metadata.
Declaration
public void ExportToPdf(string pathFile, double dpi, PdfMetadata metadata)
Parameters
Type | Name | Description |
---|---|---|
System.String | pathFile | A string that contains the name of the PDF file to which to save the output image. |
System.Double | dpi | The resolution for the output image in the PDF file. |
PdfMetadata | metadata | The PDF Metadata. |
GetBinaryNativePrinterCommands()
Generates the native printer commands in binary format (as a byte array) for this print job settings.
Declaration
public byte[] GetBinaryNativePrinterCommands()
Returns
Type | Description |
---|---|
System.Byte[] | The native printer commands for this print job settings. |
GetBinaryNativePrinterCommands(ThermalLabel)
Generates the native printer commands in binary format (as a byte array) for this print job settings and the specified ThermalLabel object.
Declaration
public byte[] GetBinaryNativePrinterCommands(ThermalLabel thermalLabel)
Parameters
Type | Name | Description |
---|---|---|
ThermalLabel | thermalLabel | The ThermalLabel object to print out. |
Returns
Type | Description |
---|---|
System.Byte[] | The native printer commands for this print job settings and the specified ThermalLabel object. |
GetImageItemPrinterCommands(ImageItem, String, ProgrammingLanguage)
Generates the printer commands for uploading an ImageItem to the printer's storage devices.
Declaration
public static byte[] GetImageItemPrinterCommands(ImageItem imageItem, string fileName, ProgrammingLanguage printerLang)
Parameters
Type | Name | Description |
---|---|---|
ImageItem | imageItem | The source ImageItem object. |
System.String | fileName | The complete name for the destination image, for example 'MYLOGO'. IMPORTANT: The image name must be 1 to 8 alphanumeric characters long. |
ProgrammingLanguage | printerLang | The Printer Programming Language. |
Returns
Type | Description |
---|---|
System.Byte[] | The printer commands for uploading an ImageItem to the printer's storage devices. |
Remarks
For ESC/POS, the file name must be two characters long!
GetNativePrinterCommands()
Generates the native printer commands for this print job settings.
Declaration
public string GetNativePrinterCommands()
Returns
Type | Description |
---|---|
System.String | The native printer commands for this print job settings. |
GetNativePrinterCommands(ThermalLabel)
Generates the native printer commands for this print job settings and the specified ThermalLabel object.
Declaration
public string GetNativePrinterCommands(ThermalLabel thermalLabel)
Parameters
Type | Name | Description |
---|---|---|
ThermalLabel | thermalLabel | The ThermalLabel object to print out. |
Returns
Type | Description |
---|---|
System.String | The native printer commands for this print job settings and the specified ThermalLabel object. |
GetTrueTypeFontPrinterCommands(Byte[], String, ProgrammingLanguage)
Generates the printer commands for uploading an Unbounded or Large True Type Font (a font which has more than 256 printable characters) to the printer's storage devices.
Declaration
public static byte[] GetTrueTypeFontPrinterCommands(byte[] ttfBinaryContent, string printerFontName, ProgrammingLanguage printerLang)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | ttfBinaryContent | The Unbounded or Large True Type Font file binary content. |
System.String | printerFontName | The complete name for the destination font (including the drive location and name, for ZPL e.g. "B:ARIAL"; for Fingerprint e.g. "c:ARIAL"). IMPORTANT: The name must be 1 to 8 alphanumeric characters long. |
ProgrammingLanguage | printerLang | The Printer Programming Language |
Returns
Type | Description |
---|---|
System.Byte[] | The printer commands for uploading an Unbounded or Large True Type Font (a font which has more than 256 printable characters) to the printer's storage devices. |
GetTrueTypeFontPrinterCommands(String, String, ProgrammingLanguage)
Generates the printer commands for uploading an Unbounded or Large True Type Font (a font which has more than 256 printable characters) to the printer's storage devices.
Declaration
public static byte[] GetTrueTypeFontPrinterCommands(string ttfFilePath, string printerFontName, ProgrammingLanguage printerLang)
Parameters
Type | Name | Description |
---|---|---|
System.String | ttfFilePath | The Unbounded or Large True Type Font file path. |
System.String | printerFontName | The complete name for the destination font (including the drive location and name, for ZPL e.g. "B:ARIAL"; for Fingerprint e.g. "c:ARIAL"). IMPORTANT: The name must be 1 to 8 alphanumeric characters long. |
ProgrammingLanguage | printerLang | The Printer Programming Language. |
Returns
Type | Description |
---|---|
System.Byte[] | The printer commands for uploading an Unbounded or Large True Type Font (a font which has more than 256 printable characters) to the printer's storage devices. |