Platforms to show: All Mac Windows Linux Cross-Platform

WindowsPrinterMBS class

Type Topic Plugin Version macOS Windows Linux iOS Targets
class Printing Windows MBS Win Plugin 3.4 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
The class for an open connection to a windows printer.
Example
// list the jobs waiting in a printer queue on Windows
Var printer As WindowsPrinterMBS = WindowsPrinterMBS.OpenPrinter("Microsoft Print to PDF")
If printer = Nil Then
MessageBox "Printer not found."
Return
End If

Var lines() As String
For Each job As WindowsPrinterJobMBS In printer.AllJobs
lines.Add job.JobID.ToString + ": " + job.Document + " (" + job.TotalPages.ToString + " pages)"
Next

MessageBox printer.PrinterName + ": " + lines.Count.ToString + " jobs" + EndOfLine + String.FromArray(lines, EndOfLine)

Objects of this class can operate on printers.
Some operations need administrative permissions. If you don't have them, lasterror is set to 5.

This class has no subclasses.

Blog Entries

Some methods using this class:

Some examples using this class:

Some related classes:


The items on this page are in the following plugins: MBS Win Plugin.


WindowsPrinterJobMBS   -   WindowsProcessCpuUsageReportMBS


The biggest plugin in space...