Show / Hide Table of Contents

Class PrintJobCanceledException

The exception thrown when a print job is stopped early because a LabelProgress event handler set Cancel to true.

Inheritance
System.Object
System.Exception
PrintJobCanceledException
Inherited Members
System.Exception.GetBaseException()
System.Exception.ToString()
System.Exception.GetObjectData(System.Runtime.Serialization.SerializationInfo, System.Runtime.Serialization.StreamingContext)
System.Exception.GetType()
System.Exception.Message
System.Exception.Data
System.Exception.InnerException
System.Exception.TargetSite
System.Exception.StackTrace
System.Exception.HelpLink
System.Exception.Source
System.Exception.HResult
System.Exception.SerializeObjectState
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.MemberwiseClone()
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, ExportToPdf and ExportToHtml: 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
Back to top Copyright © 2003- Neodynamic SRL
http://www.neodynamic.com