Class: Gtk::PrintJob
- Inherits:
-
Object
- Object
- Gtk::PrintJob
- Defined in:
- (unknown)
Overview
A GtkPrintJob 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 [classGtk.PrintUnixDialog] API.
Use [methodGtk.PrintJob.get_surface] to obtain the cairo surface
onto which the pages must be drawn. Use [methodGtk.PrintJob.send]
to send the finished job to the printer. If you don’t use cairo
GtkPrintJob also supports printing of manually generated PostScript,
via [methodGtk.PrintJob.set_source_file].
Instance Method Summary collapse
-
#collate ⇒ Boolean
Gets whether this job is printed collated.
-
#collate=(collate) ⇒ nil
Sets whether this job is printed collated.
-
#get_page_ranges(n_ranges) ⇒ Array<Gtk::PageRange>
Gets the page ranges for this job.
-
#initialize(title, printer, settings, page_setup) ⇒ Gtk::PrintJob
constructor
Creates a new
GtkPrintJob. -
#n_up ⇒ Integer
Gets the n-up setting for this job.
-
#n_up=(n_up) ⇒ nil
Sets the n-up setting for this job.
-
#n_up_layout ⇒ Gtk::NumberUpLayout
Gets the n-up layout setting for this job.
-
#n_up_layout=(layout) ⇒ nil
Sets the n-up layout setting for this job.
-
#num_copies ⇒ Integer
Gets the number of copies of this job.
-
#num_copies=(num_copies) ⇒ nil
Sets the number of copies for this job.
-
#page_set ⇒ Gtk::PageSet
Gets the
GtkPageSetsetting for this job. -
#page_set=(page_set) ⇒ nil
Sets the
GtkPageSetsetting for this job. -
#page_setup ⇒ Gtk::PageSetup
Page setup.
-
#page_setup=(page_setup) ⇒ Gtk::PageSetup
Page setup.
-
#pages ⇒ Gtk::PrintPages
Gets the
GtkPrintPagessetting for this job. -
#pages=(pages) ⇒ nil
Sets the
GtkPrintPagessetting for this job. -
#printer ⇒ Gtk::Printer
The printer to send the job to.
-
#printer=(printer) ⇒ Gtk::Printer
The printer to send the job to.
-
#reverse ⇒ Boolean
Gets whether this job is printed reversed.
-
#reverse=(reverse) ⇒ nil
Sets whether this job is printed reversed.
-
#rotate ⇒ Boolean
Gets whether the job is printed rotated.
-
#rotate=(rotate) ⇒ nil
Sets whether this job is printed rotated.
-
#scale ⇒ Float
Gets the scale for this job.
-
#scale=(scale) ⇒ nil
Sets the scale for this job.
-
#send(callback, user_data, dnotify) ⇒ nil
Sends the print job off to the printer.
-
#set_page_ranges(ranges, n_ranges) ⇒ nil
Sets the page ranges for this job.
-
#settings ⇒ Gtk::PrintSettings
Printer settings.
-
#settings=(settings) ⇒ Gtk::PrintSettings
Printer settings.
-
#source_fd=(fd) ⇒ Boolean
Make the
GtkPrintJobsend an existing document to the printing system. -
#source_file=(filename) ⇒ Boolean
Make the
GtkPrintJobsend an existing document to the printing system. -
#status ⇒ Gtk::PrintStatus
Gets the status of the print job.
-
#surface ⇒ cairo::Surface
Gets a cairo surface onto which the pages of the print job should be rendered.
-
#title ⇒ String
The title of the print job.
-
#title=(title) ⇒ String
The title of the print job.
-
#track_print_status ⇒ Boolean
Returns whether jobs will be tracked after printing.
-
#track_print_status=(track_print_status) ⇒ Boolean
true if the print job will continue to emit status-changed signals after the print data has been setn to the printer.
-
#track_print_status? ⇒ Boolean
true if the print job will continue to emit status-changed signals after the print data has been setn to the printer.
Constructor Details
#initialize(title, printer, settings, page_setup) ⇒ Gtk::PrintJob
Creates a new GtkPrintJob.
Instance Method Details
#collate ⇒ Boolean
Gets whether this job is printed collated.
#collate=(collate) ⇒ nil
Sets whether this job is printed collated.
#get_page_ranges(n_ranges) ⇒ Array<Gtk::PageRange>
Gets the page ranges for this job.
#n_up ⇒ Integer
Gets the n-up setting for this job.
#n_up=(n_up) ⇒ nil
Sets the n-up setting for this job.
#n_up_layout ⇒ Gtk::NumberUpLayout
Gets the n-up layout setting for this job.
#n_up_layout=(layout) ⇒ nil
Sets the n-up layout setting for this job.
#num_copies ⇒ Integer
Gets the number of copies of this job.
#num_copies=(num_copies) ⇒ nil
Sets the number of copies for this job.
#page_set ⇒ Gtk::PageSet
Gets the GtkPageSet setting for this job.
#page_set=(page_set) ⇒ nil
Sets the GtkPageSet setting for this job.
#page_setup ⇒ Gtk::PageSetup
Page setup.
#page_setup=(page_setup) ⇒ Gtk::PageSetup
Page setup.
#pages ⇒ Gtk::PrintPages
Gets the GtkPrintPages setting for this job.
#pages=(pages) ⇒ nil
Sets the GtkPrintPages setting for this job.
#printer ⇒ Gtk::Printer
The printer to send the job to.
#printer=(printer) ⇒ Gtk::Printer
The printer to send the job to.
#reverse ⇒ Boolean
Gets whether this job is printed reversed.
#reverse=(reverse) ⇒ nil
Sets whether this job is printed reversed.
#rotate ⇒ Boolean
Gets whether the job is printed rotated.
#rotate=(rotate) ⇒ nil
Sets whether this job is printed rotated.
#scale ⇒ Float
Gets the scale for this job.
#scale=(scale) ⇒ nil
Sets the scale for this job.
1.0 means unscaled.
#send(callback, user_data, dnotify) ⇒ nil
Sends the print job off to the printer.
#set_page_ranges(ranges, n_ranges) ⇒ nil
Sets the page ranges for this job.
#settings ⇒ Gtk::PrintSettings
Printer settings.
#settings=(settings) ⇒ Gtk::PrintSettings
Printer settings.
#source_fd=(fd) ⇒ Boolean
Make the GtkPrintJob send an existing document to the
printing system.
The file can be in any format understood by the platforms printing system (typically PostScript, but on many platforms PDF may work too). See [methodGtk.Printer.accepts_pdf] and [methodGtk.Printer.accepts_ps].
This is similar to [methodGtk.PrintJob.set_source_file], but takes expects an open file descriptor for the file, instead of a filename.
#source_file=(filename) ⇒ Boolean
Make the GtkPrintJob send an existing document to the
printing system.
The file can be in any format understood by the platforms printing system (typically PostScript, but on many platforms PDF may work too). See [methodGtk.Printer.accepts_pdf] and [methodGtk.Printer.accepts_ps].
#status ⇒ Gtk::PrintStatus
Gets the status of the print job.
#surface ⇒ cairo::Surface
Gets a cairo surface onto which the pages of the print job should be rendered.
#title ⇒ String
The title of the print job.
#title=(title) ⇒ String
The title of the print job.
#track_print_status ⇒ Boolean
Returns whether jobs will be tracked after printing.
For details, see [methodGtk.PrintJob.set_track_print_status].
#track_print_status=(track_print_status) ⇒ Boolean
true if the print job will continue to emit status-changed signals after the print data has been setn to the printer.
#track_print_status? ⇒ Boolean
true if the print job will continue to emit status-changed signals after the print data has been setn to the printer.