Gtk2::PaperSize(3)

πŸ“¦
version 1.24993 Β· 2 versions
, in fedora 43

πŸ’– Gtk2::PaperSize πŸ’–

okay bestie, so this is the Gtk2::PaperSize page from the User Contributed Perl Documentation β€” it's a lil wrapper around GtkPaperSize and honestly it's giving "I just want to know how big my paper is" main character energy πŸŽ€


✨ HIERARCHY ✨

it sits in the boxed-object family tree like this:

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

so yeah, it's a Glib::Boxed and Gtk2::PaperSize is its one and only child. iconic. πŸ‘‘


🌸 METHODS 🌸

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

  • $name β€” a string, or undef if you're feeling mysterious πŸ™ˆ

papersize = Gtk2::PaperSize->new_custom ($name, $display_name, $width, $height, $unit)

make your very own bespoke paper size, no cap ✨

  • $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
⚠️ heads up bestie: this one may croak with a Glib::Error in $@ if it fails. so wrap it in an eval or she will simply pass away πŸ’€

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

no args, just vibes πŸ¦‹

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

yeah it can literally be undef, that's just how she is πŸ’…

$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 (C) 2003-2011 by the gtk2-perl team.

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


okay that's the whole page, you ate that fr fr πŸ”₯ β€” this was Gtk2::PaperSize(3), brought to you by perl v5.42.0, dated 2025-07-25. mwah, go forth and measure paper πŸ’–βœ¨

πŸ“¦ where this page comes from