Export (0) Print
Expand All
Expand Minimize

PrintQueue.IsOutOfPaper Property

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

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

'Declaration
Public ReadOnly Property IsOutOfPaper As Boolean

Property Value

Type: System.Boolean
true if the printer needs to be reloaded; otherwise, false.

If the printer does not support a signal with this meaning, then the property is always false.

The following example shows how to use this property as part of a survey all printers for possible error status.

		' Check for possible trouble states of a printer using its properties
		Friend Shared Sub SpotTroubleUsingProperties(ByRef statusReport As String, ByVal pq As PrintQueue)
			If pq.HasPaperProblem Then
				statusReport = statusReport & "Has a paper problem. "
			End If
			If Not(pq.HasToner) Then
				statusReport = statusReport & "Is out of toner. "
			End If
			If pq.IsDoorOpened Then
				statusReport = statusReport & "Has an open door. "
			End If
			If pq.IsInError Then
				statusReport = statusReport & "Is in an error state. "
			End If
			If pq.IsNotAvailable Then
				statusReport = statusReport & "Is not available. "
			End If
			If pq.IsOffline Then
				statusReport = statusReport & "Is off line. "
			End If
			If pq.IsOutOfMemory Then
				statusReport = statusReport & "Is out of memory. "
			End If
			If pq.IsOutOfPaper Then
				statusReport = statusReport & "Is out of paper. "
			End If
			If pq.IsOutputBinFull Then
				statusReport = statusReport & "Has a full output bin. "
			End If
			If pq.IsPaperJammed Then
				statusReport = statusReport & "Has a paper jam. "
			End If
			If pq.IsPaused Then
				statusReport = statusReport & "Is paused. "
			End If
			If pq.IsTonerLow Then
				statusReport = statusReport & "Is low on toner. "
			End If
			If pq.NeedUserIntervention Then
				statusReport = statusReport & "Needs user intervention. "
			End If

			' Check if queue is even available at this time of day
			' The following method is defined in the complete example.
			ReportAvailabilityAtThisTime(statusReport, pq)

		End Sub 'end SpotTroubleUsingProperties

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft