PDF::AP...DF::Page(3)
πΈ NAME πΈ
PDF::API2::Basic::PDF::Page β a low-level PDF page object, bestie π
β¨ DESCRIPTION β¨
Okay so picture this: it's one single page of output, in PDF form. That's the whole gig. It's giving "one page, but make it structurally iconic."
But lowkey it does a LOT more than just sit there looking pretty β it also keeps track of the content stream, plus any resources (fonts and friends π) that are getting switched around, and all that other bookkeeping tea. π«
Also, plot twist: Page inherits from Pages, because they share a bunch of methods. But fr fr, structurally they are really quite different. Not the same vibe at all. It's giving distant cousins who happen to share a locker. π
π INSTANCE VARIABLES π
A page has various working variables, and yes they're all working hard:
curstrmβ the currently open stream. That's it, that's the variable. β¨
π METHODS π
π PDF::API2::Basic::PDF::Page->new($pdf, $parent, $index)
Creates a new page based on a pages object β and yeah, that could be the root object, no big deal. π
The page is also added to the parent right at this point, so heads up: pages are ordered in a PDF document in the order in which they are created, NOT in the order they are closed. The way that creation order is the main character and closing order is just... there. π
Only the essential elements in the page dictionary get created here β everything else is either optional or can be inherited. Minimal effort, inherited excellence. Periodt.
The optional index value indicates the index in the parent list that this page should be inserted at, so that new pages don't have to be appended. Slay, flexible positioning. π¦
πΈ $p->ship_out($pdf)
Ships the page out to the given output file context. Bon voyage, page. π’β¨
No cap, that's the entire manual. Short and iconic. π
Perl v5.42.0, dated 2025-09-01 β and that's the tea from the User Contributed Perl Documentation, bestie. Mwah, bye, go make some PDFs π«Άπ
π¦ where this page comes from
- fedora 43: perl-PDF-API2 2.048-1.fc43 Β· LGPL-2.1-or-later AND (GPL-1.0-or-later OR Artistic-1.0-Perl) AND (MIT OR Artistic-1.0-Perl)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms