---
name: "Gtk2::PrintContext"
section: "3pm"
platform: "linux"
package: "libgtk2-perl-doc"
version: "2:1.24992-1"
release: "Debian 10 (Buster)"
platforms: ["linux"]
url: "https://new.carta.tech/Gtk2::PrintContext"
---

# Gtk2::PrintContext(3pm)

wrapper for GtkPrintContext

## NAME

Gtk2::PrintContext - wrapper for GtkPrintContext

## HIERARCHY

```
  Glib::Object
  +----Gtk2::PrintContext
```

## METHODS

### context = $context-\>get\_cairo\_context

### $context-\>set\_cairo\_context ($cr, $dpi\_x, $dpi\_y)

- •

  `$cr` (Cairo::Context)

- •

  `$dpi_x` (double)

- •

  `$dpi_y` (double)

### context = $context-\>create\_pango\_context

### layout = $context-\>create\_pango\_layout

### double = $context-\>get\_dpi\_x

### double = $context-\>get\_dpi\_y

### (top, bottom, left, right) = $context-\>get\_hard\_margins

Returns an empty list if the hard margins could not be retrieved.

Since: gtk+ 2.20

### double = $context-\>get\_height

### pagesetup = $context-\>get\_page\_setup

### fontmap = $context-\>get\_pango\_fontmap

### double = $context-\>get\_width

## SEE ALSO

Gtk2, Glib::Object

## COPYRIGHT

Copyright (C) 2003-2011 by the gtk2-perl team.

This software is licensed under the LGPL.  See Gtk2 for a full notice.
