gtk.printer

Module for [Printer] class

Types 3

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
GType _gType() @property
Printer self()Returns `this`, for use in `with` statements.
PrinterGidBuilder builder()Get builder for [gtk.printer.Printer] Returns: New builder object
bool acceptingJobs() @propertyGet `acceptingJobs` property. Returns: true if the printer is accepting jobs.
string iconName() @propertyGet `iconName` property. Returns: Icon name to use for the printer.
int jobCount() @propertyGet `jobCount` property. Returns: Number of jobs queued in the printer.
string location() @propertyGet `location` property. Returns: Information about the location of the printer.
string name() @propertyGet `name` property. Returns: The name of the printer.
bool paused() @propertyGet `paused` property. Returns: true if this printer is paused.
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 PDF
bool acceptsPs()Returns whether the printer accepts input in PostScript format. Returns: true if printer accepts PostScript
int compare(gtk.printer.Printer b)Compares two printers.
gtk.types.PrintBackend getBackend()Returns the backend of the printer. Returns: the backend of printer
gtk.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 printer
bool 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 printer
int getJobCount()Gets the number of jobs currently queued on the printer. Returns: the number of jobs on printer
string getLocation()Returns a description of the location of the printer. Returns: the location of printer
string getName()Returns the name of the printer. Returns: the name of printer
string getStateMessage()Returns the state message describing the current state of the printer. Returns: the state message of printer
bool hasDetails()Returns whether the printer details are available. Returns: true if printer details are available
bool isAcceptingJobs()Returns whether the printer is accepting jobs Returns: true if printer is accepting jobs
bool isActive()Returns whether the printer is currently active (i.e. accepts new jobs). Returns: true if printer is active
bool isDefault()Returns whether the printer is the default printer. Returns: true if printer is the default
bool 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 virtual
gtk.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(void * ptr, Flag!"Take" take)
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

Fluent builder for [gtk.printer.Printer]

Methods