Create  Edit  FrontPage  Index  Search  Changes  History  RSS  Login

Gtk::PrintJob

class Gtk::PrintJob

Represents a print job

Class Methods

Gtk::PrintJob.new(title, printer, settings, page_setup)
Creates a new Gtk::PrintJob. Since 2.10

Instance Methods

send{|job| ...}
Sends the print job off to the printer. Since 2.10
  • {|job|...}: an block to call when the job completes. If an error occurs, it raises GLib::Error.
  • Returns: self
set_source_file(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?. Since 2.10
  • filename: the file to be printed
  • Returns: self
source_file=(filename)
Same as #set_source_file. Since 2.10
  • Returns: nil
status
Gets the status of the print job. Since 2.10
  • Returns: the status of self
surface
Gets a cairo surface onto which the pages of the print job should be rendered. Since 2.10
  • Returns: the cairo surface of self
page_setup
Gets the Page Setup. Since 2.10
  • Returns: Page Setup
page_setup=(page_setup)
Sets the Page Setup. Since 2.10
  • page_setup: Page Setup
  • Returns: page_setup
set_page_setup(page_setup)
Same as page_setup=. Since 2.10
  • page_setup: Page Setup
  • Returns: self
printer
Gets the Printer to print the job to. Since 2.10
  • Returns: Printer to print the job to
printer=(printer)
Sets the Printer to print the job to. Since 2.10
  • printer: Printer to print the job to
  • Returns: printer
set_printer(printer)
Same as printer=. Since 2.10
  • printer: Printer to print the job to
  • Returns: self
settings
Gets the Printer settings. Since 2.10
  • Returns: Printer settings
settings=(settings)
Sets the Printer settings. Since 2.10
  • settings: Printer settings
  • Returns: settings
set_settings(settings)
Same as settings=. Since 2.10
  • settings: Printer settings
  • Returns: self
title
Gets the Title of the print job. Since 2.10
  • Returns: Title of the print job
title=(title)
Sets the Title of the print job. Since 2.10
  • title: Title of the print job
  • Returns: title
set_title(title)
Same as title=. Since 2.10
  • title: Title of the print job
  • Returns: self
track_print_status?
Gets the value wheter the print job will continue to emit status-changed signals after the print data has been sent to the printer or print server. Since 2.10
  • Returns: true if the print job will continue to emit status-changed signals after the print data has been sent to the printer or print server.
track_print_status=(track_print_status)
Sets the value whether the print job will continue to emit status-changed signals after the print data has been sent to the printer or print server. Since 2.10
  • track_print_status: true if the print job will continue to emit status-changed signals after the print data has been sent to the printer or print server.
  • Returns: track_print_status
set_track_print_status(track_print_status)
Same as track_print_status=. Since 2.10
  • track_print_status: true if the print job will continue to emit status-changed signals after the print data has been sent to the printer or print server.
  • Returns: self

Properties

page-setup: Gtk::PageSetup (Read/Write)
Page Setup Since 2.10
printer: Gtk::Printer (Read/Write)
Printer to print the job to Since 2.10
settings: Gtk::PrintSettings (Read/Write)
Printer settings Since 2.10
title: String (Read/Write)
Title of the print job Since 2.10
track-print-status: true or false (Read/Write)
true if the print job will continue to emit status-changed signals after the print data has been sent to the printer or print server. Since 2.10

Signals

status-changed: self
Gets emitted when the status of a job changes. The signal handler can use Gtk::PrintJob#status to obtain the new status. Since 2.10

ChangeLog

  • 2006-11-03: Modified - Masao
  • 2006-07-10: updated for 2.10. - kou

- kou

Last modified:2008/04/10 20:15:18
Keyword(s):
References:[Gtk::PrintUnixDialog] [Ruby/GTK] [api-gtk-index] [Gtk::PrintJob] [Gtk::Printer] [index-ruby-gtk2]