ppd_get_page_length(3)

πŸ“¦ version 0.10, in debian bookworm, ubuntu jammy

πŸ’– 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:

  1. a pointer to a valid PpdFile structure (go see ppd_file_new(3) if you need to make one, bestie)
  2. 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