PaperSize
Object Hierarchy:
Description:
[ CCode ( copy_function = "g_boxed_copy" , free_function = "g_boxed_free" , type_id = "gtk_paper_size_get_type ()" ) ]
[ Compact ]
public class PaperSize
`GtkPaperSize` 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). In addition to standard paper sizes, `GtkPaperSize` allows to
construct custom paper sizes with arbitrary dimensions.
The `GtkPaperSize` object stores not only the dimensions (width and height) of a paper size and its name, it also provides default print
margins.
Content:
Static methods:
- public static unowned string get_default ()
Returns the name of the default paper size, which depends on the current
locale.
- public static List<PaperSize> get_paper_sizes (bool include_custom)
Creates a list of known paper sizes.
Creation methods:
- public PaperSize (string? name)
Creates a new `GtkPaperSize` object by parsing a [PWG 5101.1-2002](
ftp://ftp.
- public PaperSize.custom (string name, string display_name, double width, double height, Unit unit)
Creates a new `GtkPaperSize` object with the given parameters.
- public PaperSize.from_gvariant (Variant variant)
Deserialize a paper size from a `GVariant`.
- public PaperSize.from_ipp (string ipp_name, double width, double height)
Creates a new `GtkPaperSize` object by using IPP information.
- public PaperSize.from_key_file (KeyFile key_file, string? group_name) throws Error
Reads a paper size from the group group_name
in the key file
key_file
.
- public PaperSize.from_ppd (string ppd_name, string ppd_display_name, double width, double height)
Creates a new `GtkPaperSize` object by using PPD information.
Methods: