gtk.printer
Module for [Printer] class
Types 3
classPrinter : gobject.object.ObjectWrap
A [gtk.printer.Printer] object represents a printer.
You only need to deal directly with printers if you use the non-portable [gtk.print_unix_dialog.PrintUnixDialog] API.
A [gtk.printer.Printer] allows to get status information about the printer, such as its description, its location, the number of queued jobs, etc. Most importantly, a [gtk.printer.Printer] object can be used to create a [gtk.print_job.PrintJob] object, which lets you print to the printer.
Methods
PrinterGidBuilder builder()Get builder for [gtk.printer.Printer] Returns: New builder objectbool acceptingJobs() @propertyGet `acceptingJobs` property. Returns: true if the printer is accepting jobs.string location() @propertyGet `location` property. Returns: Information about the location of the printer.string stateMessage() @propertyGet `stateMessage` property. Returns: String giving the current status of the printer.bool acceptsPdf()Returns whether the printer accepts input in PDF format. Returns: true if printer accepts PDFbool acceptsPs()Returns whether the printer accepts input in PostScript format. Returns: true if printer accepts PostScriptint compare(gtk.printer.Printer b)Compares two printers.gtk.types.PrintBackend getBackend()Returns the backend of the printer. Returns: the backend of printergtk.types.PrintCapabilities getCapabilities()Returns the printer’s capabilities.gtk.page_setup.PageSetup getDefaultPageSize()Returns default page size of printer. Returns: a newly allocated [gtk.page_setup.PageSetup] with default page size of the printer.string getDescription()Gets the description of the printer. Returns: the description of printerbool getHardMargins(out double top, out double bottom, out double left, out double right)Retrieve the hard margins of printer.bool getHardMarginsForPaperSize(gtk.paper_size.PaperSize paperSize, out double top, out double bottom, out double left, out double right)Retrieve the hard margins of printer for paper_size.string getIconName()Gets the name of the icon to use for the printer. Returns: the icon name for printerint getJobCount()Gets the number of jobs currently queued on the printer. Returns: the number of jobs on printerstring getLocation()Returns a description of the location of the printer. Returns: the location of printerstring getName()Returns the name of the printer. Returns: the name of printerstring getStateMessage()Returns the state message describing the current state of the printer. Returns: the state message of printerbool hasDetails()Returns whether the printer details are available. Returns: true if printer details are availablebool isAcceptingJobs()Returns whether the printer is accepting jobs Returns: true if printer is accepting jobsbool isActive()Returns whether the printer is currently active (i.e. accepts new jobs). Returns: true if printer is activebool isDefault()Returns whether the printer is the default printer. Returns: true if printer is the defaultbool isPaused()Returns whether the printer is currently paused.bool isVirtual()Returns whether the printer is virtual (i.e. does not represent actual printer hardware, but something like a CUPS class). Returns: true if printer is virtualgtk.page_setup.PageSetup[] listPapers()Lists all the paper sizes printer supports.void requestDetails()Requests the printer details.gulong connectDetailsAcquired(T)(T callback, Flag!"After" after = No.After) if (isCallable!T
&& is(ReturnType!T == void)
&& (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] == bool)))
&& (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] : gtk.printer.Printer)))
&& Parameters!T.length < 3)Connect to `DetailsAcquired` signal.Constructors
this(string name, gtk.types.PrintBackend backend, bool virtual)Creates a new [gtk.printer.Printer].Methods
T name(string propval)Set `name` property. Params: propval = The name of the printer. Returns: Builder instance for fluent chaining