Class PrintJobCanceledException
The exception thrown when a print job is stopped early because a LabelProgress event handler set Cancel to true.
Inheritance
Inherited Members
Namespace: Neodynamic.SDK.Printing
Assembly: cs.temp.dll.dll
Syntax
public class PrintJobCanceledException : Exception, ISerializable, _Exception
Remarks
What happens to the output already generated for the labels processed before the cancellation point depends on which PrintJob method was called:
- GetNativePrinterCommands() / GetBinaryNativePrinterCommands() (and their overloads): nothing is returned from the method itself (it throws), but the commands generated for every label completed before cancellation are available via PartialCommands / PartialBinaryCommands on this exception.
-
ExportToImage,ExportToPdfandExportToHtml: the destination file or Stream you provided already contains a complete, valid image/PDF/HTML with the labels processed before cancellation (the document is properly finalized/closed before this exception is thrown) - PartialCommands and PartialBinaryCommands are not used for these.
Properties
LabelIndex
Gets the zero-based index of the label that was about to be processed when the job was canceled.
Declaration
public int LabelIndex { get; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
PartialBinaryCommands
Gets the native printer commands (as binary) generated for every label completed before cancellation. Only populated when the job was canceled while inside GetBinaryNativePrinterCommands; null otherwise.
Declaration
public byte[] PartialBinaryCommands { get; }
Property Value
| Type | Description |
|---|---|
| System.Byte[] |
PartialCommands
Gets the native printer commands (as text) generated for every label completed before cancellation. Only populated when the job was canceled while inside GetNativePrinterCommands; null otherwise.
Declaration
public string PartialCommands { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
TotalLabels
Gets the total number of labels that were going to be processed in this print job.
Declaration
public int TotalLabels { get; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |