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
PrintJobGidBuilder builder()Get builder for [gtk.print_job.PrintJob] Returns: New builder objectgtk.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.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 collateduint getNUp()Gets the n-up setting for this job. Returns: the n-up settinggtk.types.NumberUpLayout getNUpLayout()Gets the n-up layout setting for this job. Returns: the n-up layoutint getNumCopies()Gets the number of copies of this job. Returns: the number of copiesgtk.types.PageRange[] getPageRanges()Gets the page ranges for this job. Returns: a pointer to an array of [gtk.types.PageRange] structsgtk.types.PageSet getPageSet()Gets the [gtk.types.PageSet] setting for this job. Returns: the [gtk.types.PageSet] settinggtk.types.PrintPages getPages()Gets the [gtk.types.PrintPages] setting for this job. Returns: the [gtk.types.PrintPages] settinggtk.printer.Printer getPrinter()Gets the [gtk.printer.Printer] of the print job. Returns: the printer of jobbool 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 rotateddouble getScale()Gets the scale for this job. Returns: the scalegtk.print_settings.PrintSettings getSettings()Gets the [gtk.print_settings.PrintSettings] of the print job. Returns: the settings of jobgtk.types.PrintStatus getStatus()Gets the status of the print job. Returns: the status of jobcairo.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 jobbool 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(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 chainingT printer(gtk.printer.Printer propval)Set `printer` property. Params: propval = The printer to send the job to. Returns: Builder instance for fluent chainingT settings(gtk.print_settings.PrintSettings propval)Set `settings` property. Params: propval = Printer settings. Returns: Builder instance for fluent chainingT title(string propval)Set `title` property. Params: propval = The title of the print job. Returns: Builder instance for fluent chainingT 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...