ppd_get_page_length(3)
π ppd_get_page_length β bestie's guide to page dimensions π
okay so this is a page from the Library Functions Manual, and it's about ppd_get_page_length(3) plus its two ride-or-die siblings. Three little functions whose whole job is pulling page dimensions out of a PPD file. lowkey iconic.
πΈ NAME πΈ
ppd_get_page_length, ppd_get_page_size, ppd_get_page_width β a set of functions for retrieving the page dimension from a PPD file. that's it, that's the gig π
β¨ SYNOPSIS β¨
#include <ppd.h>
float ppd_get_page_length(PpdFile *ppd, const char *name);
PpdSize *ppd_get_page_size(PpdFile *ppd, const char *name);
float ppd_get_page_width(PpdFile *ppd, const char *name);
π¦ DESCRIPTION π¦
so these functions give you, the programmer, a way to query the dimensions of a given page layout inside a PPD file. no cap, that's the whole vibe. π
all three functions take two parameters as input:
- a pointer to a valid
PpdFilestructure (go seeppd_file_new(3)if you need to make one, bestie) - the name of the page layout you wanna query
that's it. two args. in and out. we love a simple API fr fr π«Ά
π RETURN VALUE π
ppd_get_page_length()β returns the page length for a given layout. it's giving "how long is this page" energy.ppd_get_page_size()β returns a pointer to the page size record for the given size. a whole record, not just a number, okay? main character behavior.ppd_get_page_width()β returns the page width for a given layout. yes ma'am, the other dimension. π
π SEE ALSO π
ppd_file_new(3), ppd_emit_to_file(3), ppd_file_free(3), ppd_find_choice(3), ppd_check_option_is_marked(3), ppd_get_num_conflicts(3)
the whole friend group, honestly. go read them too. β¨
π AUTHOR π
this man page was written by Gerald Carter <gcarter@valinux.com>. it was updated by Mark Fasheh <mfasheh@valinux.com> to reflect changes in libppd 0.5. some of the code was originally part of the Common UNIX Printing System (CUPS).
give them their flowers π
okay bestie that's the whole page π go forth and query those page dimensions, you absolute legend. this was the ppd_get_page_length(3) entry from the Library Functions Manual β slay, periodt, no cap. π§β
π¦ where this page comes from
- debian bookworm: libppd-dev 2:0.10-9 Β· GPL-2.0-or-later
- ubuntu jammy: libppd-dev 2:0.10-8 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms