The papersize describes the dimensions of a paper.
More...
The papersize describes the dimensions of a paper.
Enumerator |
---|
PAPERSIZE_TYPE_STANDARD |
Standard paper size.
|
PAPERSIZE_TYPE_ENVELOPE |
Envelope.
|
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).
|
void stp_default_media_size |
( |
const stp_vars_t * |
v, |
|
|
int * |
width, |
|
|
int * |
height |
|
) |
| |
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. |
Get a papersize by its index number.
- Parameters
-
idx | the index number. This must not be greater than (total number of papers - 1). |
- Returns
- a static pointer to the papersize, or NULL on failure.
Get a papersize by name.
- Parameters
-
name | the short unique name of the paper. |
- Returns
- a static pointer to the papersize, or NULL on failure.
Get a papersize by size.
The nearest available size to the size requested will be found. Only paper sizes within 5 points of width and height will be considered.
- Parameters
-
length | the length of the paper. |
width | the width of the paper |
- Returns
- a static pointer to the papersize, or NULL on failure.
const stp_papersize_t* stp_get_papersize_by_size_exact |
( |
int |
length, |
|
|
int |
width |
|
) |
| |
Get a papersize by size if an exact match is found.
- Parameters
-
length | the length of the paper. |
width | the width of the paper |
- Returns
- a static pointer to the papersize, or NULL on failure.
int stp_known_papersizes |
( |
void |
| ) |
|
Get the number of available papersizes.
- Returns
- the number of papersizes.