libgutenprint API Reference 5.3.6-2026-02-01T02-18-9b0bdf87

Data Structures | Enumerations | Functions
papersize

The papersize describes the dimensions of a paper. More...

## Data Structures
struct | stp_papersize_t
| The papersize data type. More...

## Enumerations
enum | stp_papersize_unit_t { PAPERSIZE_ENGLISH_STANDARD , PAPERSIZE_METRIC_STANDARD , PAPERSIZE_ENGLISH_EXTENDED , PAPERSIZE_METRIC_EXTENDED }
| Units of measurement. More...
enum | stp_papersize_type_t { PAPERSIZE_TYPE_STANDARD = 0 , PAPERSIZE_TYPE_ENVELOPE }

## Functions
const stp_papersize_t * | stp_describe_papersize (const stp_vars_t *v, const char *name)
| Get a papersize by name.
void | stp_default_media_size (const stp_vars_t *v, stp_dimension_t *width, stp_dimension_t *height)
| Get the default paper dimensions for the current configuration.

## Detailed Description

The papersize describes the dimensions of a paper.

## Enumeration Type Documentation

## ◆ stp_papersize_type_t

enum stp_papersize_type_t

Enumerator
PAPERSIZE_TYPE_STANDARD | Standard paper size.
PAPERSIZE_TYPE_ENVELOPE | Envelope.

## ◆ stp_papersize_unit_t

enum stp_papersize_unit_t

Units of measurement.

Enumerator
PAPERSIZE_ENGLISH_STANDARD | English/Imperial units.
PAPERSIZE_METRIC_STANDARD | Metric units.
PAPERSIZE_ENGLISH_EXTENDED | English/Imperial units (optional paper, not displayed by default).
PAPERSIZE_METRIC_EXTENDED | Metric units (optional paper, not displayed by default).

## Function Documentation

## ◆ stp_default_media_size()

void stp_default_media_size | ( | const stp_vars_t * | v,
|  | stp_dimension_t * | width,
|  | stp_dimension_t * | height )
| extern

Get the default paper dimensions for the current configuration.

The default is derived from the PageSize parameter if set, otherwise the default page size for the printer is used. If no value can be determined, 1x1 will be returned.

Parameters

  v | the Gutenprint vars object
  width | pointer to storage that the width will be returned in.
  height | pointer to storage that the height will be returned in.

## ◆ stp_describe_papersize()

const stp_papersize_t * stp_describe_papersize | ( | const stp_vars_t * | v,
|  | const char * | name )
| extern

Get a papersize by name.

Parameters

  v | the Gutenprint vars object
  name | the short unique name of the paper.

Returns
  a static pointer to the papersize, or NULL on failure.