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 _getGType() static nothrow
GType _gType() @property nothrow
PrintJob self() nothrowReturns `this`, for use in `with` statements.
PrintJobGidBuilder builder() static nothrowGet builder for [gtk.print_job.PrintJob] Returns: New builder object
gtk.page_setup.PageSetup pageSetup() @property nothrowGet `pageSetup` property. Returns: Page setup.
gtk.printer.Printer printer() @property nothrowGet `printer` property. Returns: The printer to send the job to.
gtk.print_settings.PrintSettings settings() @property nothrowGet `settings` property. Returns: Printer settings.
string title() @property nothrowGet `title` property. Returns: The title of the print job.
bool trackPrintStatus() @property nothrowGet `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) @property nothrowSet `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() nothrowGets whether this job is printed collated. Returns: whether the job is printed collated
uint getNUp() nothrowGets the n-up setting for this job. Returns: the n-up setting
gtk.types.NumberUpLayout getNUpLayout() nothrowGets the n-up layout setting for this job. Returns: the n-up layout
int getNumCopies() nothrowGets the number of copies of this job. Returns: the number of copies
gtk.types.PageRange[] getPageRanges() nothrowGets the page ranges for this job. Returns: a pointer to an array of [gtk.types.PageRange] structs
gtk.types.PageSet getPageSet() nothrowGets the [gtk.types.PageSet] setting for this job. Returns: the [gtk.types.PageSet] setting
gtk.types.PrintPages getPages() nothrowGets the [gtk.types.PrintPages] setting for this job. Returns: the [gtk.types.PrintPages] setting
gtk.printer.Printer getPrinter() nothrowGets the [gtk.printer.Printer] of the print job. Returns: the printer of job
bool getReverse() nothrowGets whether this job is printed reversed. Returns: whether the job is printed reversed.
bool getRotate() nothrowGets whether the job is printed rotated. Returns: whether the job is printed rotated
double getScale() nothrowGets the scale for this job. Returns: the scale
gtk.print_settings.PrintSettings getSettings() nothrowGets the [gtk.print_settings.PrintSettings] of the print job. Returns: the settings of job
gtk.types.PrintStatus getStatus() nothrowGets 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() nothrowGets the job title. Returns: the title of job
bool getTrackPrintStatus() nothrowReturns whether jobs will be tracked after printing.
void send(gtk.types.PrintJobCompleteFunc callback) nothrowSends the print job off to the printer.
void setCollate(bool collate) nothrowSets whether this job is printed collated.
void setNUp(uint nUp) nothrowSets the n-up setting for this job.
void setNUpLayout(gtk.types.NumberUpLayout layout) nothrowSets the n-up layout setting for this job.
void setNumCopies(int numCopies) nothrowSets the number of copies for this job.
void setPageSet(gtk.types.PageSet pageSet) nothrowSets the [gtk.types.PageSet] setting for this job.
void setPages(gtk.types.PrintPages pages) nothrowSets the [gtk.types.PrintPages] setting for this job.
void setReverse(bool reverse) nothrowSets whether this job is printed reversed.
void setRotate(bool rotate) nothrowSets whether this job is printed rotated.
void setScale(double scale) nothrowSets 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) nothrowIf 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) nothrowConnect 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].

Fluent builder implementation template for gtk.print_job.PrintJob

Methods
T pageSetup(gtk.page_setup.PageSetup propval) nothrowSet `pageSetup` property. Params: propval = Page setup. Returns: Builder instance for fluent chaining
T printer(gtk.printer.Printer propval) nothrowSet `printer` property. Params: propval = The printer to send the job to. Returns: Builder instance for fluent chaining
T settings(gtk.print_settings.PrintSettings propval) nothrowSet `settings` property. Params: propval = Printer settings. Returns: Builder instance for fluent chaining
T title(string propval) nothrowSet `title` property. Params: propval = The title of the print job. Returns: Builder instance for fluent chaining
T trackPrintStatus(bool propval) nothrowSet `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
PrintJob build() nothrowCreate object from builder. Returns: New object