gtk.PaperSize an object providing support for named paper sizes (new in PyGTK 2.10) Synopsis gtk.PaperSize gobject.GBoxed gtk.PaperSize nameNone copy is_equal size2 get_name get_display_name get_ppd_name get_width unit get_height unit is_custom set_size width height unit get_default_top_margin unit get_default_bottom_margin unit get_default_left_margin unit get_default_right_margin unit Functions gtk.paper_size_new_from_ppd ppd_name ppd_display_name width height gtk.paper_size_new_cutom name display_name width height unit gtk.paper_size_get_default Description This class is available in PyGTK 2.10 and above. A gtk.PaperSize handles paper sizes. It uses the standard called "PWG 5101.1-2002 PWG: Standard for Media Standardized Names" to name the paper sizes (and to get the data for the page sizes). The common standard paper sizes are named by the . In addition to standard paper sizes, gtk.PaperSize allows to construct custom paper sizes with arbitrary dimensions. The gtk.PaperSize object stores not only the dimensions (width and height) of a paper size and its name, it also provides default print margins. Constructor gtk.PaperSize gtk.PaperSize nameNone name : a paper size name, or None Returns : a new gtk.PaperSize. This constructor is available in PyGTK 2.10 and above. Creates a new gtk.PaperSize object by parsing a PWG 5101.1-2002 PWG paper name. If name is None, the default paper size is returned, see paper_size_get_default(). Methods gtk.PaperSize.copy copy Returns : a copy of other This method is available in PyGTK 2.10 and above. The copy() method copies an existing gtk.PaperSize. gtk.PaperSize.is_equal is_equal size2 size2 : another gtk.PaperSize object Returns : True, if this paper size and size2 represent the same paper size This method is available in PyGTK 2.10 and above. The is_equal() method returns the result of comparing this paper size to the gtk.PaperSize specified by size2. gtk.PaperSize.get_name get_name Returns : the name of the paper size This method is available in PyGTK 2.10 and above. The get_name() method returns the name of the paper size. gtk.PaperSize.get_display_name get_display_name Returns : the human-readable name of the paper size. This method is available in PyGTK 2.10 and above. The get_display_name() method returns the human-readable name of the paper size. gtk.PaperSize.get_ppd_name get_ppd_name Returns : the PPD name of the paper size or None This method is available in PyGTK 2.10 and above. The get_ppd_name() method returns the PPD name of the paper size, which may be None. gtk.PaperSize.get_width get_width unit unit : the unit for the return value - one of the . Returns : the paper width This method is available in PyGTK 2.10 and above. The get_width() method returns the paper width of the paper size, in units of unit. gtk.PaperSize.get_height get_height unit unit : the unit for the return value - one of the . Returns : the paper height This method is available in PyGTK 2.10 and above. The get_height() method returns the paper height of the paper size, in units of unit. gtk.PaperSize.is_custom is_custom Returns : True if the paper size is a custom paper size. The is_custom() method returns True if paper size is not a standard paper size. gtk.PaperSize.set_size set_size width height unit width : the new width in units of unit height : the new height in units of unit unit : the unit for width and height - one of the . This method is available in PyGTK 2.10 and above. The set_size() method changes the dimensions of the paper size to width x height in the units specified by unit. gtk.PaperSize.get_default_top_margin get_default_top_margin unit unit : the unit for the return value - one of the . Returns : the default top margin This method is available in PyGTK 2.10 and above. The get_default_top_margin() method returns the default top margin for the gtk.PaperSize. gtk.PaperSize.get_default_bottom_margin get_default_bottom_margin unit unit : the unit for the return value - one of the . Returns : the default bottom margin This method is available in PyGTK 2.10 and above. The get_default_bottom_margin() method gets the default bottom margin for the paper size. gtk.PaperSize.get_default_left_margin get_default_left_margin unit unit : the unit for the return value - one of the . Returns : the default left margin This method is available in PyGTK 2.10 and above. The get_default_left_margin() method gets the default left margin for the paper size. gtk.PaperSize.get_default_right_margin get_default_right_margin unit unit : the unit for the return value - one of the . Returns : the default right margin This method is available in PyGTK 2.10 and above. The get_default_right_margin() method gets the default right margin for the paper size. Functions gtk.paper_size_new_from_ppd gtk.paper_size_new_from_ppd ppd_name ppd_display_name width height >ppd_name : a PPD paper name ppd_display_name : the corresponding human-readable name width : the paper width, in points height : the paper height in points Returns : a new gtk.PaperSize This function is available in PyGTK 2.10 and above. The paper_size new__from_ppd() function creates a new gtk.PaperSize object by using PPD information. If ppd_name is not a recognized PPD paper name, ppd_display_name, width and height are used to construct a custom gtk.PaperSize object. gtk.paper_size_new_custom gtk.paper_size_new_custom name display_name width height unit >name : the paper name display_name : the corresponding human-readable name width : the paper width, in units of unit height : the paper height in units of unit unit : the units - one of the . Returns : a new gtk.PaperSize This function is available in PyGTK 2.10 and above. The paper_size_new_custom() function creates a new gtk.PaperSize object with the given parameters. gtk.paper_size_get_default gtk.paper_size_get_default Returns : the name of the default paper size. This function is available in PyGTK 2.10 and above. The paper_size_get_default() function returns the name of the default paper size, which depends on the current locale.