PAPERINFO(3)
π PAPERINFO π
okay bestie, welcome to the paperinfo era of the manual β this is a whole family of functions from the paper.h universe, and they're all about one thing: papers. like, actual paper sizes. width, height, names, the whole vibe. no cap.
the icons of this page are paperinfo, paperwithsize, paperfirst, paperlast, papernext, and paperprev β and their entire job description is return informations about a paper. yes, "informations." the original said it, so we're keeping it. π
β¨ SYNOPSYS β¨
(spelled exactly like that, don't come for me, it's iconic)
#include <paper.h>
const struct paper* paperinfo(const char* papername)
const struct paper* paperwithsize(double psw, double psh)
char* papername(const struct paper*)
double paperpswidth(const struct paper*)
double paperpsheigth(const struct paper*)
const struct paper* paperfirst(void)
const struct paper* papernext(const struct paper* pinfo)
const struct paper* paperprev(const struct paper* pinfo)
const struct paper* paperlast(void)
lowkey important: yes, the header is<paper.h>, and yes, the synopsis really does saypaperpsheigth. we do not fix the queen's spelling here. periodt.
πΈ DESCRIPTION πΈ
okay so, let's break down the cast:
paperinfo() hands you back a pointer to a struct paper stuffed with informations about the paper whose name is papername. cute, right?
paperwithsize() is the matchmaker π«Ά β it goes looking for a paper whose width and height are psw and psh in PostScript points, and returns a pointer to the struct paper corresponding to the paper it found.
then we have the lil accessor besties, who all take one of those opaque struct paper objects and tell you a thing about it:
papername()β returns the name of the paper described by an opaquestruct paperobjectpaperpswidth()β returns the width, in PostScript points, of a paper described by an opaquestruct paperobjectpaperpsheight()β returns the height, in PostScript points, of a paper described by an opaquestruct paperobject
and finally, the traversal squad π¦:
paperfirst()andpaperlast()return the first and last entries for papers.- iterating from one entry to the next one, or back to the previous one, is done with
papernext()andpaperprev()respectively.
like, walk the list, bestie. forward, backward, you're the main character of this iteration. π
π SEE ALSO π
go read these next, they're giving very much required reading:
that's the whole page, fr fr. this one comes from the Library Functions Manual and it's dated 24 September 1996 β yes, 1996, an absolute vintage icon, we love a throwback πβ¨
π¦ where this page comes from
- centos-stream 9: libpaper-devel 1.1.28-4.el9 Β· GPLv2
- centos-stream 9: libpaper-devel 1.1.28-4.el9 Β· GPLv2
- debian bookworm: libpaper-dev 1.1.29
- nixos 26.05: libpaper 1.1.29
- ubuntu jammy: libpaper-dev 1.1.28build2
- ubuntu noble: libpaper-dev 1.1.29build1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms