PDF::Bu...:String(3)

✨ PDF::Builder::Basic::PDF::String β€” bestie edition πŸ’…

okay so this is PDF::Builder::Basic::PDF::String from the User Contributed Perl Documentation, and it's literally the PDF String type object situation. welcome 🫢

🌸 NAME 🌸

PDF::Builder::Basic::PDF::String β€” PDF String type objects πŸ’–

It's the superclass for simple objects that are basically stringlike β€” think Number, Name, etc. the whole little squad of things that are, at their core, just strings wearing a cute lil hat ✨

Inherits from PDF::Builder::Basic::PDF::Objind πŸ‘‘


πŸŽ€ METHODS πŸŽ€

from_pdf πŸ’–

PDF::Builder::Basic::PDF::String->from_pdf($string)

Creates a new string object (ngl it's not a full object yet, it's giving embryo) from a given string. The string gets parsed according to the input criteria, and yes bestie, escaping is working β€” the backslashes are doing their thing 🌈

new ✨

PDF::Builder::Basic::PDF::String->new($string)

Creates a new string object (again: not a full object yet, we're in the pre-glowup phase) from a given string. The string is parsed according to the input criteria with escaping working πŸ’«

convert πŸ¦‹

$s->convert($str)

Returns $str converted as per the criteria for input from a PDF file. that's it, that's the whole vibe 🫢

val 🌸

$s->val()

Returns the value of this string β€” which is, bestie, the string itself. no plot twist. main character returns themself πŸ’…

as_pdf πŸ”₯

$s->as_pdf()

Returns the string formatted for output as PDF, for the PDF File object $pdf πŸ“„βœ¨

outobjdeep πŸ‘‘

$s->outobjdeep($fh, $pdf)

Outputs the string in PDF format, complete with all the necessary conversions. it does the deep work. iconic behaviour fr fr πŸ’œ


lowkey important: the description says this is a superclass for stringlike objects, so if you're out here subclassing, that's the vibe check you're signing up for 🧚

perl v5.42.0 Β· 2026-01-17 β€” ok bye bestie, go parse some strings, you got this πŸŽ€πŸ’–βœ¨

πŸ“¦ where this page comes from