Poppler.PSFile

g GObject.Object GObject.Object Poppler.PSFile Poppler.PSFile GObject.Object->Poppler.PSFile

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new (document, filename, first_page, n_pages)

class

new_fd (document, fd, first_page, n_pages)

free ()

set_duplex (duplex)

set_paper_size (width, height)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

None

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Class Details

class Poppler.PSFile(**kwargs)
Bases:

GObject.Object

Abstract:

No

classmethod new(document, filename, first_page, n_pages)
Parameters:
Returns:

a Poppler.PSFile

Return type:

Poppler.PSFile

Create a new postscript file to render to

classmethod new_fd(document, fd, first_page, n_pages)
Parameters:
Returns:

a Poppler.PSFile

Return type:

Poppler.PSFile

Create a new postscript file to render to. Note that this function takes ownership of fd; you must not operate on it again, nor close it.

New in version 21.12.0.

free()

Frees self

set_duplex(duplex)
Parameters:

duplex (bool) – whether to force duplex printing (on printers which support this)

Enable or disable Duplex printing.

set_paper_size(width, height)
Parameters:
  • width (float) – the paper width in 1/72 inch

  • height (float) – the paper height in 1/72 inch

Set the output paper size. These values will end up in the DocumentMedia, the BoundingBox DSC comments and other places in the generated PostScript.