Show / Hide Table of Contents

Class PrintJob

Specifies information about how a thermal label is printed, including the printer device settings, label orientation, number of copies, etc.

Inheritance
System.Object
PrintJob
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace:Neodynamic.SDK.Printing
Assembly:Neodynamic.SDK.ThermalLabel.dll
Syntax
public class PrintJob : IDisposable

Constructors

PrintJob()

Initializes a new instance of the PrintJob class

Declaration
public PrintJob()

PrintJob(PrinterSettings)

Initializes a new instance of the PrintJob class with the specified printer settings.

Declaration
public PrintJob(PrinterSettings printerSettings)
Parameters
Type Name Description
PrinterSettings printerSettings

The printer settings which provides info about the target printer.

Properties

BufferOutput

Gets or sets a value indicating whether to buffer output printer commands. When the printer commands are buffered, the print job does not send them to the printer until the print job has been processed, or until the BufferFlush method is invoked. Default value is false i.e. the output is not buffered but sent to the printer while processing the print job.

Declaration
public bool BufferOutput { 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

PrinterSettings

Gets or sets information about the thermal printer used for printing.

Declaration
public PrinterSettings PrinterSettings { get; set; }
Property Value
Type Description
PrinterSettings

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

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

BufferFlush()

Sends all currently buffered output commands to the printer. It requires buffer is enabled on this print job through BufferOutput property.

Declaration
public void BufferFlush()
Remarks

Forces all currently buffered output commands to be sent to the printer. This method can be invoked multiple times during print job processing.

CleanCache()

Clenas the cache on the printer's memory. Important: It must be invoked after the Print method i.e as the last step of the print job process.

Declaration
public void CleanCache()

Dispose()

Declaration
public void Dispose()
Implements
System.IDisposable.Dispose()

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.

System.IO.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
System.IO.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.

System.IO.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, Int32)

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, int outputQuality)
Parameters
Type Name Description
ThermalLabel thermalLabel

The ThermalLabel object.

System.IO.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.

System.Int32 outputQuality

The quality level for the label image in the PDF Stream which is in JPEG format. It must be an integer between 1 and 100.

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, Int32)

Exports and saves this PrintJob and ThermalLabel object to the specified PDF file.

Declaration
public void ExportToPdf(ThermalLabel thermalLabel, string pathFile, double dpi, int outputQuality)
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.

System.Int32 outputQuality

The quality level for the label image in the PDF file which is in JPEG format. It must be an integer between 1 and 100.

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
System.IO.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, Int32)

Exports and saves this PrintJob to the specified Stream object in PDF format.

Declaration
public void ExportToPdf(Stream stream, double dpi, int outputQuality)
Parameters
Type Name Description
System.IO.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.

System.Int32 outputQuality

The quality level for the label image in the PDF Stream which is in JPEG format. It must be an integer between 1 and 100.

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, Int32)

Exports and saves this PrintJob to the specified PDF file.

Declaration
public void ExportToPdf(string pathFile, double dpi, int outputQuality)
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.

System.Int32 outputQuality

The quality level for the label image in the PDF file which is in JPEG format. It must be an integer between 1 and 100.

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.

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.

Print()

Starts the thermal label's printing process.

Declaration
public void Print()

Print(ThermalLabel)

Starts the printing process of the specified ThermalLabel object.

Declaration
public void Print(ThermalLabel thermalLabel)
Parameters
Type Name Description
ThermalLabel thermalLabel

The ThermalLabel object to print out.

Print(List<ThermalLabel>)

Starts the printing process of the specified group of ThermalLabel objects.

Declaration
public void Print(List<ThermalLabel> thermalLabelGroup)
Parameters
Type Name Description
System.Collections.Generic.List<ThermalLabel> thermalLabelGroup

The group of ThermalLabel objects to print out.

StartCache()

Starts the caching process uploading to the printer's memory all items marked with UseCache on the ThermalLabel object. Important: It must be invoked before the Print method.

Declaration
public void StartCache()
Back to top Copyright © 2003- Neodynamic SRL
http://www.neodynamic.com