class Gtk::PrintJob
- Gtk::PrintJob
- GObject::Object
- Reference
- Object
Overview
A Gtk::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::PrintUnixDialog
API.
Use Gtk::PrintJob#surface
to obtain the cairo surface
onto which the pages must be drawn. Use Gtk::PrintJob#send
to send the finished job to the printer. If you don’t use cairo
Gtk::PrintJob
also supports printing of manually generated PostScript,
via Gtk::PrintJob#source_file=
.
Defined in:
lib/gi-crystal/src/auto/gtk-4.0/print_job.crConstructors
-
.new(title : String, printer : Gtk::Printer, settings : Gtk::PrintSettings, page_setup : Gtk::PageSetup) : self
Creates a new
Gtk::PrintJob
. -
.new
Initialize a new
PrintJob
. - .new(*, page_setup : Gtk::PageSetup? = nil, printer : Gtk::Printer? = nil, settings : Gtk::PrintSettings? = nil, title : String? = nil, track_print_status : Bool? = nil)
Class Method Summary
-
.g_type : UInt64
Returns the type id (GType) registered in GLib type system.
Instance Method Summary
-
#collate : Bool
Gets whether this job is printed collated.
-
#collate=(collate : Bool) : Nil
Sets whether this job is printed collated.
-
#n_up : UInt32
Gets the n-up setting for this job.
-
#n_up=(n_up : UInt32) : 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 : Gtk::NumberUpLayout) : Nil
Sets the n-up layout setting for this job.
-
#num_copies : Int32
Gets the number of copies of this job.
-
#num_copies=(num_copies : Int32) : Nil
Sets the number of copies for this job.
-
#page_ranges : Enumerable(Gtk::PageRange)
Gets the page ranges for this job.
-
#page_ranges=(ranges : Enumerable(Gtk::PageRange)) : Nil
Sets the page ranges for this job.
-
#page_set : Gtk::PageSet
Gets the
Gtk::PageSet
setting for this job. -
#page_set=(page_set : Gtk::PageSet) : Nil
Sets the
Gtk::PageSet
setting for this job. - #page_setup : Gtk::PageSetup?
- #page_setup=(value : Gtk::PageSetup?) : Gtk::PageSetup?
-
#pages : Gtk::PrintPages
Gets the
Gtk::PrintPages
setting for this job. -
#pages=(pages : Gtk::PrintPages) : Nil
Sets the
Gtk::PrintPages
setting for this job. -
#printer : Gtk::Printer
Gets the
Gtk::Printer
of the print job. - #printer=(value : Gtk::Printer?) : Gtk::Printer?
-
#reverse : Bool
Gets whether this job is printed reversed.
-
#reverse=(reverse : Bool) : Nil
Sets whether this job is printed reversed.
-
#rotate : Bool
Gets whether the job is printed rotated.
-
#rotate=(rotate : Bool) : Nil
Sets whether this job is printed rotated.
-
#scale : Float64
Gets the scale for this job.
-
#scale=(scale : Float64) : Nil
Sets the scale for this job.
-
#send(callback : Gtk::PrintJobCompleteFunc) : Nil
Sends the print job off to the printer.
-
#settings : Gtk::PrintSettings
Gets the
Gtk::PrintSettings
of the print job. - #settings=(value : Gtk::PrintSettings?) : Gtk::PrintSettings?
-
#source_fd=(fd : Int32) : Bool
Make the
Gtk::PrintJob
send an existing document to the printing system. -
#source_file=(filename : String) : Bool
Make the
Gtk::PrintJob
send an existing document to the printing system. -
#status : Gtk::PrintStatus
Gets the status of the print job.
- #status_changed_signal
-
#surface : Cairo::Surface
Gets a cairo surface onto which the pages of the print job should be rendered.
-
#title : String
Gets the job title.
- #title=(value : String) : String
-
#track_print_status : Bool
Returns whether jobs will be tracked after printing.
-
#track_print_status=(track_status : Bool) : Nil
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. - #track_print_status? : Bool
Instance methods inherited from class GObject::Object
bind_property(source_property : String, target : GObject::Object, target_property : String, flags : GObject::BindingFlags) : GObject::Binding
bind_property,
bind_property_full(source_property : String, target : GObject::Object, target_property : String, flags : GObject::BindingFlags, transform_to : GObject::Closure, transform_from : GObject::Closure) : GObject::Binding
bind_property_full,
data(key : String) : Pointer(Void)?
data,
finalize
finalize,
freeze_notify : Nil
freeze_notify,
getv(names : Enumerable(String), values : Enumerable(_)) : Nil
getv,
notify(property_name : String) : Nil
notify,
notify_by_pspec(pspec : GObject::ParamSpec) : Nil
notify_by_pspec,
notify_signal
notify_signal,
property(property_name : String, value : _) : Nil
property,
qdata(quark : UInt32) : Pointer(Void)?
qdata,
ref_count : UInt32
ref_count,
run_dispose : Nil
run_dispose,
set_data(key : String, data : Pointer(Void)?) : Nil
set_data,
set_property(property_name : String, value : _) : Nil
set_property,
steal_data(key : String) : Pointer(Void)?
steal_data,
steal_qdata(quark : UInt32) : Pointer(Void)?
steal_qdata,
thaw_notify : Nil
thaw_notify,
to_unsafe : Pointer(Void)
to_unsafe,
watch_closure(closure : GObject::Closure) : Nil
watch_closure
Constructor methods inherited from class GObject::Object
cast(obj : GObject::Object) : self
cast,
cast?(obj : GObject::Object) : self?
cast?,
new(pointer : Pointer(Void), transfer : GICrystal::Transfer)new new, newv(object_type : UInt64, parameters : Enumerable(GObject::Parameter)) : self newv
Class methods inherited from class GObject::Object
compat_control(what : UInt64, data : Pointer(Void)?) : UInt64
compat_control,
g_type : UInt64
g_type,
interface_find_property(g_iface : GObject::TypeInterface, property_name : String) : GObject::ParamSpec
interface_find_property,
interface_list_properties(g_iface : GObject::TypeInterface) : Enumerable(GObject::ParamSpec)
interface_list_properties
Constructor Detail
Creates a new Gtk::PrintJob
.
Class Method Detail
Instance Method Detail
Make the Gtk::PrintJob
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 Gtk::Printer#accepts_pdf
and
Gtk::Printer#accepts_ps
.
This is similar to Gtk::PrintJob#source_file=
,
but takes expects an open file descriptor for the file,
instead of a filename.
Make the Gtk::PrintJob
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 Gtk::Printer#accepts_pdf
and
Gtk::Printer#accepts_ps
.
Gets a cairo surface onto which the pages of the print job should be rendered.
Returns whether jobs will be tracked after printing.
For details, see Gtk::PrintJob#track_print_status=
.
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.
This can allow your application to show things like “out of paper” issues, and when the print job actually reaches the printer.
This function is often implemented using some form of polling, so it should not be enabled unless needed.