gnomeprint.Job
Prev | The Gnomeprint Class Reference | Next

## gnomeprint.Job

gnomeprint.Job — Job object for GnomePrint

## Synopsis

    class gnomeprint.Job(gobject.GObject):
        gnomeprint.Job(config)
        def get_config()
        def get_context()
        def close()
        def print()
        def render(ctx)
        def render_page(ctx, page, pageops)
        def get_pages()
        def print_to_file(output)

## Ancestry

    +-- gobject.GObject
      +-- gnomeprint.Job

## Properties

"config" | Read | The configuration for the print job.
"context" | Read-Write | The context for the print job.

## Description

## Constructor

        gnomeprint.Job(config)

`config` : | a `gnomeprint.Config`.
Returns : | a new `gnomeprint.Job`.

Creates a new `gnomeprint.Job` object.

## Methods

### gnomeprint.Job.get_config

        def get_config()

Returns : | a referenced `gnomeprint.Config` for this job, `None` on error.

The `get_config`() method gets a reference to the configuration of the job.

### gnomeprint.Job.get_context

        def get_context()

Returns : | the printing context, `None` on error.

The `get_context`() method retrieve the `gnomeprint.Context` which applications print to.

### gnomeprint.Job.close

        def close()

The `close`() method closes the `gnomeprint.Job` job, ready for printing or previewing. To be called after the application has finished sending the drawing commands.

### gnomeprint.Job.print

        def print()

Returns : | GNOME_PRINT_OK on success GNOME_PRINT_ERROR_UNKNOWN otherwise.

The `print`() method print the pages stored in the `gnomeprint.Job` to the phyisical printing device.

### gnomeprint.Job.render

        def render(ctx)

`ctx` : | a `gnomeprint.Context`.
Returns : |

The `render`() renders printout to specified context (with layout, ignoring copies).

### gnomeprint.Job.render_page

        def render_page(ctx, page, pageops)

`ctx` : | a `gnomeprint.Context`.
`page` : | the page number to print.
`pageops` : |
Returns : |

The `render_page`() method renders the specified page `page`.

### gnomeprint.Job.get_pages

        def get_pages()

Returns : | the number of pages, 0 on error.

The `get_double`() method 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 convinations) 2 is returned

### gnomeprint.Job.print_to_file

        def print_to_file(output)

`output` : | filename.
Returns : |

The `print_to_file`() method prints the output to `filename`.

Prev | Up | Next
gnomeprint.Config | Home | gnomeprint.Font