PrintQueue Class

 

Manages printers and print jobs.

Namespace:   System.Printing
Assembly:  System.Printing (in System.Printing.dll)


[PrintingPermissionAttribute(SecurityAction.InheritanceDemand, 
	Level = PrintingPermissionLevel.DefaultPrinting)]
public class PrintQueue : PrintSystemObject

NameDescription
System_CAPS_pubmethodPrintQueue(PrintServer, String)

Initializes a new instance of PrintQueue class using the specified PrintServer and queue name.

System_CAPS_pubmethodPrintQueue(PrintServer, String, Int32)

Initializes a new instance of PrintQueue class using the specified PrintServer, queue name, and print schema version.

System_CAPS_pubmethodPrintQueue(PrintServer, String, Int32, PrintSystemDesiredAccess)

Initializes a new instance of PrintQueue class using the specified PrintServer, queue name, print schema version, and desired access.

System_CAPS_pubmethodPrintQueue(PrintServer, String, PrintQueueIndexedProperty[])

Initializes a new instance of PrintQueue class using the specified PrintServer, queue name, and array of PrintQueueIndexedProperty values to initialize.

System_CAPS_pubmethodPrintQueue(PrintServer, String, PrintQueueIndexedProperty[], PrintSystemDesiredAccess)

Initializes a new instance of PrintQueue class with the specified PrintServer, queue name, array of PrintQueueIndexedProperty values to initialize, and desired access.

System_CAPS_pubmethodPrintQueue(PrintServer, String, PrintSystemDesiredAccess)

Initializes a new instance of PrintQueue class using the specified PrintServer, queue name, and desired access.

System_CAPS_pubmethodPrintQueue(PrintServer, String, String[])

Initializes a new instance of PrintQueue class using the specified PrintServer, queue name, and array of property names to initialize.

System_CAPS_pubmethodPrintQueue(PrintServer, String, String[], PrintSystemDesiredAccess)

Initializes a new instance of PrintQueue class using the specified PrintServer, queue name, property filter, and desired access.

NameDescription
System_CAPS_pubpropertyAveragePagesPerMinute

Gets the speed of the printer measured in pages per minute.

System_CAPS_pubpropertyClientPrintSchemaVersion

Gets the version of the Print Schema.

System_CAPS_pubpropertyComment

Gets or sets a comment about the printer.

System_CAPS_pubpropertyCurrentJobSettings

Gets an object that contains the configuration settings for the current print job.

System_CAPS_pubpropertyDefaultPrintTicket

Gets or sets the default printer options associated with this PrintQueue.

System_CAPS_pubpropertyDefaultPriority

Gets or sets the default priority that is given to each new print job added to the queue.

System_CAPS_pubpropertyDescription

Gets a description of the print queue.

System_CAPS_pubpropertyFullName

Gets the complete name of the queue.

System_CAPS_pubpropertyHasPaperProblem

Gets a value that indicates if the printer is having an unspecified paper problem.

System_CAPS_pubpropertyHasToner

Gets a value that indicates if the printer has toner.

System_CAPS_pubpropertyHostingPrintServer

Gets or sets (protected) the print server that controls the print queue.

System_CAPS_pubpropertyInPartialTrust

Gets or sets a value that indicates whether the queue is operating in a partially trusted mode, a higher level of trust.

System_CAPS_pubpropertyIsBidiEnabled

Gets a value that indicates whether bidirectional communication with the printer is enabled.

System_CAPS_pubpropertyIsBusy

Gets a value that indicates whether the printing device is busy.

System_CAPS_pubpropertyIsDevQueryEnabled

Gets a value that indicates whether the queue holds documents when document and printer configurations do not match.

System_CAPS_pubpropertyIsDirect

Gets a value that indicates whether the queue prints directly to the printer or spools documents first and then prints them.

System_CAPS_protpropertyIsDisposed

Gets or sets a value that indicates whether the object has been disposed. (Inherited from PrintSystemObject.)

System_CAPS_pubpropertyIsDoorOpened

Gets a value that indicates whether a door is open on the printer.

System_CAPS_pubpropertyIsHidden

Gets a value that indicates whether the print queue is hidden in your application's user interface.

System_CAPS_pubpropertyIsInError

Gets a value that indicates whether the printer or device is in an error condition.

System_CAPS_pubpropertyIsInitializing

Gets a value that indicates whether the printer is initializing itself.

System_CAPS_pubpropertyIsIOActive

Gets a value that indicates whether the printer is receiving or sending data or signals.

System_CAPS_pubpropertyIsManualFeedRequired

Gets a value that indicates whether the printer needs to be manually fed paper for the current print job.

System_CAPS_pubpropertyIsNotAvailable

Gets a value that indicates whether the printer is available.

System_CAPS_pubpropertyIsOffline

Gets a value that indicates whether the printer is offline.

System_CAPS_pubpropertyIsOutOfMemory

Gets a value that indicates whether the printer is out of memory.

System_CAPS_pubpropertyIsOutOfPaper

Gets a value that indicates whether the printer needs to be reloaded with paper of the size required for the current job.

System_CAPS_pubpropertyIsOutputBinFull

Gets a value that indicates whether the output area of the printer is in danger of overflowing.

System_CAPS_pubpropertyIsPaperJammed

Gets a value that indicates whether the current sheet of paper is stuck in the printer.

System_CAPS_pubpropertyIsPaused

Gets a value that indicates whether the print queue has been paused.

System_CAPS_pubpropertyIsPendingDeletion

Gets a value that indicates whether the printer is in the process of deleting a print job.

System_CAPS_pubpropertyIsPowerSaveOn

Gets a value that indicates whether the printer is in power save mode.

System_CAPS_pubpropertyIsPrinting

Gets a value that indicates whether a job is printing.

System_CAPS_pubpropertyIsProcessing

Gets a value that indicates whether the printer is processing a print job.

System_CAPS_pubpropertyIsPublished

Gets a value that indicates whether the printer is visible to other network users.

System_CAPS_pubpropertyIsQueued

Gets a value that indicates whether the printer can support a queue with more than one print job in it at a time.

System_CAPS_pubpropertyIsRawOnlyEnabled

Gets a value that indicates whether the print queue can use EMF (Enhanced Meta File) that enables faster data flow from a printing application to the Windows spooler.

System_CAPS_pubpropertyIsServerUnknown

Gets a value that indicates whether the printer is in an error state.

System_CAPS_pubpropertyIsShared

Gets a value that indicates whether the printer is available for use by other computers on the network.

System_CAPS_pubpropertyIsTonerLow

Gets a value that indicates whether the printer is running short of toner.

System_CAPS_pubpropertyIsWaiting

Gets a value that indicates whether the queue is waiting for a job to be added.

System_CAPS_pubpropertyIsWarmingUp

Gets a value that indicates whether the printer is warming up.

System_CAPS_pubpropertyIsXpsDevice

Gets a value that indicates whether the printer's driver is built on the Printing Overview so it uses XML Paper Specification (XPS) as its page description language. 

System_CAPS_pubpropertyKeepPrintedJobs

Gets a value that indicates whether the queue is saving the printer language file instead of deleting it following printing.

System_CAPS_pubpropertyLocation

Gets or sets the printer's physical location.

System_CAPS_pubpropertySystem_CAPS_staticMaxPrintSchemaVersion

Gets the most recent possible version number of the Print Schema that the queue can use.

System_CAPS_pubpropertyName

Gets or sets the print queue's name. (Overrides PrintSystemObject.Name.)

System_CAPS_pubpropertyNeedUserIntervention

Gets a value that indicates whether the printer needs the attention of a human being.

System_CAPS_pubpropertyNumberOfJobs

Gets the total number of jobs lined up in the print queue.

System_CAPS_pubpropertyPagePunt

Gets a value that indicates whether the printer is unable to print the current page.

System_CAPS_pubpropertyParent

Gets the parent of the object. (Inherited from PrintSystemObject.)

System_CAPS_pubpropertyPrintingIsCancelled

Gets or sets a value that indicates whether the current print job is being cancelled.

System_CAPS_pubpropertyPriority

Gets or sets the priority of the print queue relative to other print queues that are hosted by the same print server and that use the same physical printer.

System_CAPS_pubpropertyPropertiesCollection

Gets a collection of attribute and value pairs. (Inherited from PrintSystemObject.)

System_CAPS_pubpropertyQueueAttributes

Gets the properties of the print queue.

System_CAPS_pubpropertyQueueDriver

Gets or sets the printer driver for the queue.

System_CAPS_pubpropertyQueuePort

Gets or sets the port that the queue uses.

System_CAPS_pubpropertyQueuePrintProcessor

Gets or sets the print processor that the queue uses.

System_CAPS_pubpropertyQueueStatus

Gets a value that represents the status of the printer. These include "warming up," "initializing," "printing," and others.

System_CAPS_pubpropertyScheduleCompletedJobsFirst

Gets a value that indicates whether the printer prints jobs that have completed the spooling process before jobs that have not fully spooled even if the latter entered the queue first or have a higher priority.

System_CAPS_pubpropertySeparatorFile

Gets or sets the path and file name of a file that is inserted at the beginning of each print job.

System_CAPS_pubpropertyShareName

Gets or sets a name for the printer that is seen by users on the network when it is shared.

System_CAPS_pubpropertyStartTimeOfDay

Gets or sets 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 printer will print a job.

System_CAPS_pubpropertyUntilTimeOfDay

Gets or sets the latest time, expressed as the number of minutes after midnight Coordinated Universal Time (UTC) (also called Greenwich Mean Time [GMT]), that the printer will print a job.

System_CAPS_pubpropertyUserPrintTicket

Gets or sets the current user's default PrintTicket object which contains detailed information about the print job.

NameDescription
System_CAPS_pubmethodAddJob()

Inserts a new (generically named) print job, whose content is a Byte array, into the queue.

System_CAPS_pubmethodAddJob(String)

Inserts a new print job, whose content is a Byte array, into the queue.

System_CAPS_pubmethodAddJob(String, PrintTicket)

Inserts a new print job for an XML Paper Specification (XPS) Document into the queue, and gives it the specified name and settings.

System_CAPS_pubmethodAddJob(String, String, Boolean)

Inserts a new print job for an XML Paper Specification (XPS) Document into the queue, gives it the specified name, and specifies whether or not it should be validated.

System_CAPS_pubmethodAddJob(String, String, Boolean, PrintTicket)

Inserts a new print job for an XML Paper Specification (XPS) Document into the queue, gives it the specified name and settings, and specifies whether or not it should be validated.

System_CAPS_pubmethodCommit()

Writes the current properties of the PrintQueue object to the actual print queue on the print server. (Overrides PrintSystemObject.Commit().)

System_CAPS_pubmethodSystem_CAPS_staticCreateXpsDocumentWriter(Double, Double)

Creates an XpsDocumentWriter object with the specified dimensions.

System_CAPS_pubmethodSystem_CAPS_staticCreateXpsDocumentWriter(PrintDocumentImageableArea)

Creates an XpsDocumentWriter object, opens a Windows common print dialog and returns a ref (ByRef in Visual Basic) parameter that represents information about the imageable area and the dimensions of the media.

System_CAPS_pubmethodSystem_CAPS_staticCreateXpsDocumentWriter(PrintDocumentImageableArea, PageRangeSelection, PageRange)

Creates an XpsDocumentWriter object, opens a Windows common print dialog, provides the dialog with a page range and a description of the print job, and returns a ref (ByRef in Visual Basic) parameter that represents information about the imageable area and the dimensions of the media.

System_CAPS_pubmethodSystem_CAPS_staticCreateXpsDocumentWriter(PrintQueue)

Creates an XpsDocumentWriter object and associates it with the specified print queue.

System_CAPS_pubmethodSystem_CAPS_staticCreateXpsDocumentWriter(String, PrintDocumentImageableArea)

Creates an XpsDocumentWriter object, opens a Windows common print dialog (and provides it a job description) and returns a ref (ByRef in Visual Basic) parameter that represents information about the imageable area and the dimensions of the media.

System_CAPS_pubmethodSystem_CAPS_staticCreateXpsDocumentWriter(String, PrintDocumentImageableArea, PageRangeSelection, PageRange)

Creates an XpsDocumentWriter object, opens a Windows common print dialog, provides the dialog with a page range, and returns a ref (ByRef in Visual Basic) parameter that represents information about the imageable area and the dimensions of the media.

System_CAPS_pubmethodDispose()

Releases all resources used by the PrintSystemObject. (Inherited from PrintSystemObject.)

System_CAPS_protmethodDispose(Boolean)

Releases the unmanaged resources used by the PrintSystemObject and optionally releases the managed resources. (Inherited from PrintSystemObject.)

System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Releases the resources that are being used by the PrintSystemObject. (Inherited from PrintSystemObject.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetJob(Int32)

Gets the print job with the specified ID number.

System_CAPS_pubmethodGetPrintCapabilities()

Gets a PrintCapabilities object that identifies the capabilities of the printer.

System_CAPS_pubmethodGetPrintCapabilities(PrintTicket)

Gets a PrintCapabilities object that identifies the capabilities of the printer.

System_CAPS_pubmethodGetPrintCapabilitiesAsXml()

Gets a MemoryStream object that specifies the printer's capabilities as an XML stream that complies with the Print Schema.

System_CAPS_pubmethodGetPrintCapabilitiesAsXml(PrintTicket)

Gets a MemoryStream object that specifies the printer's capabilities in an XML format that complies with the Print Schema.

System_CAPS_pubmethodGetPrintJobInfoCollection()

Creates a collection that contains a PrintSystemJobInfo object for each job in the queue.

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_protmethodInitialize()

Initializes the properties of the PrintSystemObject. (Inherited from PrintSystemObject.)

System_CAPS_protmethodInternalDispose(Boolean)

Releases the unmanaged resources used by the PrintQueue and optionally releases the managed resources. (Overrides PrintSystemObject.InternalDispose(Boolean).)

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_pubmethodMergeAndValidatePrintTicket(PrintTicket, PrintTicket)

Merges two PrintTickets and guarantees that the resulting PrintTicket is valid and does not ask for any printing functionality that the printer does not support.

System_CAPS_pubmethodMergeAndValidatePrintTicket(PrintTicket, PrintTicket, PrintTicketScope)

Merges two PrintTickets and guarantees that the resulting PrintTicket is valid, does not ask for any printing functionality that the printer does not support, and is limited to the specified scope.

System_CAPS_pubmethodPause()

Pauses the print queue. It remains paused until Resume is executed.

System_CAPS_pubmethodPurge()

Removes all the jobs in the print queue.

System_CAPS_pubmethodRefresh()

Updates the properties of the PrintQueue object with values from the printer and the print queue utility that runs on the computer. (Overrides PrintSystemObject.Refresh().)

System_CAPS_pubmethodResume()

Restarts a print queue that was paused.

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

Some properties of the PrintQueue object represent characteristics of the print queue utility that runs on the computer, but others represent features or states of the printer itself. For example, NumberOfJobs is a characteristic of the print queue, but Location is a property of the printer. Many of the properties of the printer, such as whether it needs user attention, need to be passed, by means of the Refresh method, from the printer itself to the PrintQueue object. This should be done before the corresponding property (NeedUserIntervention) is read by your program. Similarly, when your program changes the values of one or more properties of a PrintQueue object, the change must be written to the actual print queue utility on the computer. Do this with the Commit method.

System_CAPS_cautionCaution

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.

If you want to print from a Windows Forms application, see the System.Drawing.Printing namespace.

.NET Framework
Available since 3.0

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: