PaperSize

class PaperSize(pointer: <Error class: unknown class><<Error class: unknown class>>)

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.

Constructors

Link copied to clipboard
constructor(pointer: <Error class: unknown class><<Error class: unknown class>>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val gtkPaperSizePointer: <Error class: unknown class><<Error class: unknown class>>

Functions

Link copied to clipboard

Copies an existing GtkPaperSize.

Link copied to clipboard
fun free()

Free the given GtkPaperSize object.

Link copied to clipboard
fun getDefaultBottomMargin(unit: Unit): <Error class: unknown class>

Gets the default bottom margin for the GtkPaperSize.

Link copied to clipboard
fun getDefaultLeftMargin(unit: Unit): <Error class: unknown class>

Gets the default left margin for the GtkPaperSize.

Link copied to clipboard
fun getDefaultRightMargin(unit: Unit): <Error class: unknown class>

Gets the default right margin for the GtkPaperSize.

Link copied to clipboard
fun getDefaultTopMargin(unit: Unit): <Error class: unknown class>

Gets the default top margin for the GtkPaperSize.

Link copied to clipboard

Gets the human-readable name of the GtkPaperSize.

Link copied to clipboard
fun getHeight(unit: Unit): <Error class: unknown class>

Gets the paper height of the GtkPaperSize, in units of @unit.

Link copied to clipboard

Gets the name of the GtkPaperSize.

Link copied to clipboard

Gets the PPD name of the GtkPaperSize, which may be null.

Link copied to clipboard
fun getWidth(unit: Unit): <Error class: unknown class>

Gets the paper width of the GtkPaperSize, in units of @unit.

Link copied to clipboard

Returns true if @size is not a standard paper size.

Link copied to clipboard

Compares two GtkPaperSize objects.

Link copied to clipboard
fun isIpp(): Boolean

Returns true if @size is an IPP standard paper size.

Link copied to clipboard
fun setSize(width: <Error class: unknown class>, height: <Error class: unknown class>, unit: Unit)

Changes the dimensions of a @size to @width x @height.

Link copied to clipboard
fun toGvariant(): <Error class: unknown class>

Serialize a paper size to an a{sv} variant.

Link copied to clipboard
fun toKeyFile(keyFile: <Error class: unknown class>, groupName: String)

This function adds the paper size from @size to @key_file.