PDF::Bu...ct::Form(3)

✨ NAME ✨

okay so bestie, welcome to PDF::Bu...ct::Form(3) πŸ’– β€” yes the header cuts the name off because it's long, but it's the page for PDF::Builder::Resource::XObject::Form, the base class for external form objects. She's part of the User Contributed Perl Documentation collection, iykyk.

and the family tree? she inherits from PDF::Builder::Resource::XObject. that's the lore. 🌸


πŸ¦‹ METHODS πŸ¦‹

πŸŽ€ new

$form = PDF::Builder::Resource::XObject::Form->new($pdf)

creates a form resource. that's it, that's the whole job. new form, brand new, main character energy πŸ‘‘

πŸŽ€ bbox

($llx, $lly, $urx, $ury) = $form->bbox($llx, $lly, $urx, $ury)

get or set the coordinates of the form object's bounding box. so like, $llx, $lly, $urx, $ury β€” lower-left x, lower-left y, upper-right x, upper-right y β€” the four corners of where this form lives. ask for them, or tell her what they should be, both work πŸ’…

πŸŽ€ resource

$resource = $form->resource($type, $key)
$form->resource($type, $key, $object, $force)

get or add a resource that the form's contents need β€” think a Font, an XObject, a ColorSpace, etc. the little support squad the form can't function without fr fr 🫢

⚠️ heads up: by default, an existing $key will not be overwritten. she's loyal like that. if you really wanna override that behavior, set $force β€” and then it's on you, bestie πŸ’€

and that's the whole page! no cap, that's all she wrote 🌈

perl v5.42.0 Β· 2026-01-17 β€” mwah, dated and versioned, iconic behavior, periodt πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from