CAPS Universe documentation
1.0.4
All you need to know to be successful
|
Makes the life easier (sometimes) More...
Functions | |
const char * | caps_drv_medium_name_from_size_get (const struct caps_rect *size) |
struct caps_rect | caps_drv_medium_size_from_name_get (const char *paper_name) |
You can call these functions in most of all callbacks.
const char * caps_drv_medium_name_from_size_get | ( | const struct caps_rect * | size | ) |
Get the medium format name for a specific size
[in] | size | The size information in [pts] |
Returns the best matching format name like a4 or letter for the specific size. This is a convenience function and a wrapper around libpaper and the returned name is more or less guessed.
If it returns "custom", nobody has a clue what kind of format it is. Be prepared!
struct caps_rect caps_drv_medium_size_from_name_get | ( | const char * | paper_name | ) |
Get dimension information about a specific medium format name in [pts]
[in] | paper_name | Name of the paper (refer "paperconf -a" for valid names) |
paper_name
in portrait orientationIf the paper isn't known, the returned size will be 0.0
in both axis (e.g. empty). Refer CAPS_REC_IS_EMPTY to catch this case.
This is a wrapper around libpaper and for convinience and not related to the job and document.