gtk.print_job

Module for [PrintJob] class

Types 3

A [gtk.print_job.PrintJob] object represents a job that is sent to a printer.

You only need to deal directly with print jobs if you use the non-portable [gtk.print_unix_dialog.PrintUnixDialog] API.

Use [gtk.print_job.PrintJob.getSurface] to obtain the cairo surface onto which the pages must be drawn. Use [gtk.print_job.PrintJob.send] to send the finished job to the printer. If you don’t use cairo [gtk.print_job.PrintJob] also supports printing of manually generated PostScript, via [gtk.print_job.PrintJob.setSourceFile].

Methods
GType _gType() @property
PrintJob self()Returns `this`, for use in `with` statements.
PrintJobGidBuilder builder()Get builder for [gtk.print_job.PrintJob] Returns: New builder object
gtk.page_setup.PageSetup pageSetup() @propertyGet `pageSetup` property. Returns: Page setup.
gtk.printer.Printer printer() @propertyGet `printer` property. Returns: The printer to send the job to.
gtk.print_settings.PrintSettings settings() @propertyGet `settings` property. Returns: Printer settings.
string title() @propertyGet `title` property. Returns: The title of the print job.
bool trackPrintStatus() @propertyGet `trackPrintStatus` property. Returns: true if the print job will continue to emit status-changed signals after the print data has been setn to the printer.
void trackPrintStatus(bool propval) @propertySet `trackPrintStatus` property. Params: propval = true if the print job will continue to emit status-changed signals after the print data has been setn to the printer.
bool getCollate()Gets whether this job is printed collated. Returns: whether the job is printed collated
uint getNUp()Gets the n-up setting for this job. Returns: the n-up setting
gtk.types.NumberUpLayout getNUpLayout()Gets the n-up layout setting for this job. Returns: the n-up layout
int getNumCopies()Gets the number of copies of this job. Returns: the number of copies
gtk.types.PageRange[] getPageRanges()Gets the page ranges for this job. Returns: a pointer to an array of [gtk.types.PageRange] structs
gtk.types.PageSet getPageSet()Gets the [gtk.types.PageSet] setting for this job. Returns: the [gtk.types.PageSet] setting
gtk.types.PrintPages getPages()Gets the [gtk.types.PrintPages] setting for this job. Returns: the [gtk.types.PrintPages] setting
gtk.printer.Printer getPrinter()Gets the [gtk.printer.Printer] of the print job. Returns: the printer of job
bool getReverse()Gets whether this job is printed reversed. Returns: whether the job is printed reversed.
bool getRotate()Gets whether the job is printed rotated. Returns: whether the job is printed rotated
double getScale()Gets the scale for this job. Returns: the scale
gtk.print_settings.PrintSettings getSettings()Gets the [gtk.print_settings.PrintSettings] of the print job. Returns: the settings of job
gtk.types.PrintStatus getStatus()Gets the status of the print job. Returns: the status of job
cairo.surface.Surface getSurface()Gets a cairo surface onto which the pages of the print job should be rendered. Returns: the cairo surface of job Throws: [ErrorWrap]
string getTitle()Gets the job title. Returns: the title of job
bool getTrackPrintStatus()Returns whether jobs will be tracked after printing.
void send(gtk.types.PrintJobCompleteFunc callback)Sends the print job off to the printer.
void setCollate(bool collate)Sets whether this job is printed collated.
void setNUp(uint nUp)Sets the n-up setting for this job.
void setNUpLayout(gtk.types.NumberUpLayout layout)Sets the n-up layout setting for this job.
void setNumCopies(int numCopies)Sets the number of copies for this job.
void setPageSet(gtk.types.PageSet pageSet)Sets the [gtk.types.PageSet] setting for this job.
void setPages(gtk.types.PrintPages pages)Sets the [gtk.types.PrintPages] setting for this job.
void setReverse(bool reverse)Sets whether this job is printed reversed.
void setRotate(bool rotate)Sets whether this job is printed rotated.
void setScale(double scale)Sets the scale for this job.
bool setSourceFd(int fd)Make the [gtk.print_job.PrintJob] send an existing document to the printing system.
bool setSourceFile(string filename)Make the [gtk.print_job.PrintJob] send an existing document to the printing system.
void setTrackPrintStatus(bool trackStatus)If track_status is true, the print job will try to continue report on the status of the print job in the printer queues and printer.
gulong connectStatusChanged(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] : gtk.print_job.PrintJob))) && Parameters!T.length < 2)Connect to `StatusChanged` signal.
Constructors
this(void * ptr, Flag!"Take" take)
this(string title, gtk.printer.Printer printer, gtk.print_settings.PrintSettings settings, gtk.page_setup.PageSetup pageSetup)Creates a new [gtk.print_job.PrintJob].
Methods
T pageSetup(gtk.page_setup.PageSetup propval)Set `pageSetup` property. Params: propval = Page setup. Returns: Builder instance for fluent chaining
T printer(gtk.printer.Printer propval)Set `printer` property. Params: propval = The printer to send the job to. Returns: Builder instance for fluent chaining
T settings(gtk.print_settings.PrintSettings propval)Set `settings` property. Params: propval = Printer settings. Returns: Builder instance for fluent chaining
T title(string propval)Set `title` property. Params: propval = The title of the print job. Returns: Builder instance for fluent chaining
T trackPrintStatus(bool propval)Set `trackPrintStatus` property. Params: propval = true if the print job will continue to emit status-changed signals after the print data has been setn to the printer. Returns: Builder instance fo...

Fluent builder for [gtk.print_job.PrintJob]

Methods