---
name: "Gtk2::PaperSize"
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::PaperSize"
---

# Gtk2::PaperSize(3pm)

wrapper for GtkPaperSize

## NAME

Gtk2::PaperSize - wrapper for GtkPaperSize

## HIERARCHY

```
  Glib::Boxed
  +----Gtk2::PaperSize
```

## METHODS

### papersize = Gtk2::PaperSize-\>new ($name)

- •

  `$name` (string or undef)

### papersize = Gtk2::PaperSize-\>new\_custom ($name, $display\_name, $width, $height, $unit)

- •

  `$name` (string)

- •

  `$display_name` (string)

- •

  `$width` (double)

- •

  `$height` (double)

- •

  `$unit` (Gtk2::Unit)

### papersize = Gtk2::PaperSize-\>new\_from\_key\_file ($key\_file, $group\_name)

- •

  `$key_file` (Glib::KeyFile)

- •

  `$group_name` (string)

May croak with a Glib::Error in $@ on failure.

Since: gtk+ 2.12

### papersize = Gtk2::PaperSize-\>new\_from\_ppd ($ppd\_name, $ppd\_display\_name, $width, $height)

- •

  `$ppd_name` (string)

- •

  `$ppd_display_name` (string)

- •

  `$width` (double)

- •

  `$height` (double)

### double = $size-\>get\_default\_bottom\_margin ($unit)

- •

  `$unit` (Gtk2::Unit)

### string = Gtk2::PaperSize-\>get\_default

### double = $size-\>get\_default\_left\_margin ($unit)

- •

  `$unit` (Gtk2::Unit)

### double = $size-\>get\_default\_right\_margin ($unit)

- •

  `$unit` (Gtk2::Unit)

### double = $size-\>get\_default\_top\_margin ($unit)

- •

  `$unit` (Gtk2::Unit)

### string = $size-\>get\_display\_name

### double = $size-\>get\_height ($unit)

- •

  `$unit` (Gtk2::Unit)

### boolean = $size-\>is\_custom

### boolean = $size1-\>is\_equal ($size2)

- •

  `$size2` (Gtk2::PaperSize)

### string = $size-\>get\_name

### list = Gtk2::PaperSize::get\_paper\_sizes ($include\_custom)

- •

  `$include_custom` (boolean)

Since: gtk+ 2.12

### string or undef = $size-\>get\_ppd\_name

### $size-\>set\_size ($width, $height, $unit)

- •

  `$width` (double)

- •

  `$height` (double)

- •

  `$unit` (Gtk2::Unit)

### $size-\>to\_key\_file ($key\_file, $group\_name)

- •

  `$key_file` (Glib::KeyFile)

- •

  `$group_name` (string)

Since: gtk+ 2.12

### double = $size-\>get\_width ($unit)

- •

  `$unit` (Gtk2::Unit)

## ENUMS AND FLAGS

### enum Gtk2::Unit

- •

  'pixel' / 'GTK\_UNIT\_PIXEL'

- •

  'points' / 'GTK\_UNIT\_POINTS'

- •

  'inch' / 'GTK\_UNIT\_INCH'

- •

  'mm' / 'GTK\_UNIT\_MM'

## SEE ALSO

Gtk2, Glib::Boxed

## COPYRIGHT

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

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