Create  Edit  FrontPage  Index  Search  Changes  History  RSS  Login

Gnome::PrintJob

Class Methods

Gnome::PrintJob.new(config=nil)
Creates a new Gnome::PrintJob.

Instance Methods

close
Closes self, ready for printing or previewing. To be called after the application has finished sending the drawing commands
  • Returns: nil
context
Retrieve the Gnome::PrintContext which applications print to.
  • Returns: The printing context, nil on error
page_size
Get the imaging area size that is available to the application. Sizes are given in PS points (Gnome::PrintUnit::PS_UNIT)
  • Returns: Array of width and height of paper of current config on success, nil on failure
pages
Find the number of pages stored in a completed printout. This is the number of physical pages, so if the layout can hold 4 pages per page, and 5 logical pages are printed (5 beginpage/endpage combinations) 2 is returned
  • Returns: the number of pages, 0 on error
print
Print the pages stored in the Gnome::PrintJob to the physical printing device.
print_to_file(output)
Sets/unsets the print to file option for the job.
  • output: output file, if nil sets print to file to false
  • Returns: nil on success, otherwise raises an exception of Gnome::PrintError
render(context)
Renders printout to specified context (with layout, ignoring copies)
render_page(context, page, pageops)
Renders the specified page page
  • context: Gnome::PrintContext
  • page: page number to want to render
  • pageops: whether send begingpage/showpage to output
  • Returns: nil on success, otherwise raises an exception of Gnome::PrintError
config
Gets the configuration of the job
config=(config)
set_config(config)
Sets the configuration for the print job.
  • config: The configuration for the print job
  • Returns: config
context=(context)
Sets the context for the print job.
  • context: The context for the print job
  • Returns: context
set_context(context)
Same as context=.
  • context: The context for the print job
  • Returns: self

Properties

config: Gnome::PrintConfig (Read/Write)
The configuration for the print job
context: Gnome::PrintMeta (Read/Write)
The context for the print job

ChangeLog

  • 2005-06-08 kou: completed.

- kou

Last modified:2008/04/10 20:15:18
Keyword(s):
References:[index-ruby-gnomeprint] [News_20050731_1] [Ruby/GnomePrint] [Gnome::PrintJobPreview] [Gnome::PrintDialog] [Gnome::PrintJob]