PrintSystemJobInfo 类

定义

详细定义打印作业。Defines a print job in detail.

public ref class PrintSystemJobInfo : System::Printing::PrintSystemObject
public class PrintSystemJobInfo : System.Printing.PrintSystemObject
type PrintSystemJobInfo = class
    inherit PrintSystemObject
Public Class PrintSystemJobInfo
Inherits PrintSystemObject
继承
PrintSystemJobInfo

注解

此类没有公共构造函数。This class has no public constructor. PrintSystemJobInfo若要获取对对象的引用, 请使用静态PrintSystemJobInfo.Get方法或以下PrintQueue实例方法之一: GetJobGetPrintJobInfoCollectionAddJobTo get a reference to a PrintSystemJobInfo object, use the static PrintSystemJobInfo.Get method or one of the following PrintQueue instance methods: GetJob, GetPrintJobInfoCollection, or AddJob.

许多打印作业属性 (例如作业是否已完成) 必须先从打印机传递到PrintSystemJobInfo对象, 然后应用程序才能读取相应的属性 (IsCompleted)。Many print job properties, such as whether a job is completed, must be passed from the printer to the PrintSystemJobInfo object before your application reads the corresponding property (IsCompleted). Refresh方法提供此功能。The Refresh method provides this functionality.

同样, 如果应用程序更改JobName属性的值, 则必须将更改写入计算机上的打印队列实用工具中。Similarly, when your application changes the value of the JobName property, the change must be written to the print queue utility on the computer. Commit方法提供此功能。The Commit method provides this functionality.

如果从PrintSystemJobInfo派生具有其他可写属性的类, 则必须实现RefreshCommit方法的重写。If you derive a class from PrintSystemJobInfo that has additional writable properties, then you must implement an override of the Refresh and Commit methods.

注意

System.Printing命名空间中的类不支持在 Windows 服务或 ASP.NET 应用程序或服务中使用。Classes within the System.Printing namespace are not supported for use within a Windows service or ASP.NET application or service. 尝试从这些应用程序类型之一中使用这些类可能会产生意外的问题, 例如降低服务性能和运行时异常。Attempting to use these classes from within one of these application types may produce unexpected problems, such as diminished service performance and run-time exceptions.

如果要从 Windows 窗体应用程序进行打印, 请参阅System.Drawing.Printing命名空间。If you want to print from a Windows Forms application, see the System.Drawing.Printing namespace.

属性

HostingPrintQueue

获取承载打印作业的打印队列。Gets the print queue that is hosting the print job.

HostingPrintServer

获取承载打印作业的打印队列的打印服务器。Gets the print server that is hosting the print queue for the print job.

IsBlocked

获取一个值,该值指示打印作业是否因被阻止而没有打印。Gets a value that indicates whether the print job is blocked and therefore, not printing.

IsCompleted

获取一个值,该值指示打印作业是否已完成。Gets a value that indicates whether the print job is finished.

IsDeleted

获取一个值,该值指示打印作业(由 PrintSystemJobInfo 对象表示)是否已从打印队列中删除。Gets a value that indicates whether the print job, which is represented by the PrintSystemJobInfo object, was deleted from the print queue.

IsDeleting

获取一个值,该值指示是否正在从打印队列中删除打印作业。Gets a value that indicates whether the print job is being deleted from the print queue.

IsDisposed

获取或设置一个值,该值指示该对象是否已被释放。Gets or sets a value that indicates whether the object has been disposed.

(继承自 PrintSystemObject)
IsInError

获取一个值,该值指示错误条件是否与打印作业相关联。Gets a value that indicates whether an error condition is associated with the print job.

IsOffline

获取一个值,该值指示打印机是否脱机。Gets a value that indicates whether the printer is offline.

IsPaperOut

获取一个值,该值指示打印机是否已用完打印作业所需的纸张大小和类型。Gets a value that indicates whether the printer has run out of the paper size and type that the print job requires.

IsPaused

获取一个值,该值指示打印作业是否已暂停。Gets a value that indicates whether the print job is paused.

IsPrinted

获取一个值,该值指示打印作业是否已打印。Gets a value that indicates whether the print job printed.

IsPrinting

获取一个值,该值指示打印作业是否正在被打印。Gets a value that indicates whether the print job is being printed.

IsRestarted

获取一个值,该值指示打印作业是否已重新启动。Gets a value that indicates whether the print job has been restarted.

IsRetained

获取一个值,该值指示打印作业在被打印后是否已保存到队列中。Gets a value that indicates whether the print job was saved in the queue after it printed.

IsSpooling

获取一个值,该值指示打印作业是否正在进行后台处理。Gets a value that indicates whether the print job is being spooled.

IsUserInterventionRequired

获取一个值,该值指示打印机是否需要用户干预。Gets a value that indicates whether the printer needs user intervention.

JobIdentifier

获取打印作业的标识号。Gets the identification number for the print job.

JobName

获取或设置打印作业的名称。Gets or sets a name for the print job.

JobSize

获取打印作业的大小(以字节为单位)。Get the size, in bytes, of the print job.

JobStatus

获取打印作业的当前状态。Gets the current status of the print job.

JobStream

获取对打印作业的 Stream 的引用。Gets a reference to the Stream of the print job.

Name

获取对象的名称。Gets the name of the object.

(继承自 PrintSystemObject)
NumberOfPages

获取打印作业中的页数。Gets the number of pages in the print job.

NumberOfPagesPrinted

获取已打印的页数。Gets the number of pages that have already printed.

Parent

获取对象的父级。Gets the parent of the object.

(继承自 PrintSystemObject)
PositionInPrintQueue

获取打印作业在打印队列中的位置。Gets the print job's place in the print queue.

Priority

获取一个非数字表达式,该表达式表示打印作业相对于打印队列中其他作业的优先级。Gets a non-numerical expression that represents the priority of the print job relative to other jobs in the print queue.

PropertiesCollection

获取特性和值对的集合。Gets a collection of attribute and value pairs.

(继承自 PrintSystemObject)
StartTimeOfDay

获取一天中打印作业可以开始打印的最早时间,用协调世界时 (UTC)(也称为格林尼治标准时间 [GMT])午夜过后的分钟数表示。Gets the earliest time of day, expressed as the number of minutes after midnight Coordinated Universal Time (UTC) (also called Greenwich Mean Time [GMT]), that the print job can begin printing.

Submitter

获取提交打印作业的用户的名称。Gets the name of the user who submitted the print job.

TimeJobSubmitted

获取提交打印作业的日期和时间。Gets the date and time that the print job is submitted.

TimeSinceStartedPrinting

获取自打印作业开始打印后已过去的时间(以毫秒为单位)。Gets the time, in milliseconds, since the print job started printing.

UntilTimeOfDay

获取一天中打印作业可以开始打印的最晚时间,用协调世界时 (UTC)(也称为格林尼治标准时间 [GMT])午夜过后的分钟数表示。Gets the last time of day, expressed as the number of minutes after midnight Coordinated Universal Time (UTC) (also called Greenwich Mean Time [GMT]), that the print job can begin printing.

方法

Cancel()

取消打印作业。Cancels the print job.

Commit()

PrintSystemJobInfo 对象属性的任何更改写入该对象所代表的实际打印作业中。Writes any changes to the properties of the PrintSystemJobInfo object to the actual print job that the object represents.

Dispose()

释放 PrintSystemObject 使用的所有资源。Releases all resources used by the PrintSystemObject.

(继承自 PrintSystemObject)
Dispose(Boolean)

释放 PrintSystemObject 使用的非托管资源,并选择性地释放托管资源。Releases the unmanaged resources used by the PrintSystemObject and optionally releases the managed resources.

(继承自 PrintSystemObject)
Equals(Object)

确定指定对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
Get(PrintQueue, Int32)

在指定的 PrintSystemJobInfo 中获取指定作业的 PrintQueueGets the PrintSystemJobInfo for the specified job in the specified PrintQueue.

GetHashCode()

用作默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
Initialize()

初始化 PrintSystemObject 的属性。Initializes the properties of the PrintSystemObject.

(继承自 PrintSystemObject)
InternalDispose(Boolean)

释放由 PrintSystemJobInfo 占用的非托管资源,还可以选择释放托管资源。Releases the unmanaged resources that are used by the PrintSystemJobInfo and optionally, releases the managed resources.

MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
Pause()

暂停打印作业,直到 Resume() 运行。Halts printing of the job until Resume() runs.

Refresh()

更新 PrintSystemJobInfo 对象的属性,以便它们的值与该对象所代表的实际打印作业的值相匹配。Updates the properties of the PrintSystemJobInfo object so that their values match the values of the actual print job that the object represents.

Restart()

从头开始重新启动打印作业。Restarts a print job from the beginning.

Resume()

继续打印暂停的打印作业。Resumes the printing of a paused print job.

ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(继承自 Object)

适用于