PDF::Bu...F::Utils(3)

πŸ’– PDF::Builder::Basic::PDF::Utils(3) πŸ’–

okay bestie, gather round β€” this is the PDF::Builder::Basic::PDF::Utils page from your friendly neighborhood User Contributed Perl Documentation. It's the lil' grab-bag of helper functions that keeps your fingers from falling off while you build PDFs. 🫢


✨ NAME ✨

PDF::Builder::Basic::PDF::Utils</purpose> β€” utility functions for the PDF library. literally just vibes and shortcuts. πŸ’…


🌸 DESCRIPTION 🌸

It's a whole set of utility functions whose entire job is to save the fingers of the PDF library users! πŸ’€πŸ–οΈ No cap β€” that's the actual mission statement. Type less, build more, protect your wrists. periodt.


πŸŽ€ METHODS πŸŽ€

⭐ PDFBool

PDFBool()

Creates a Bool via PDF::Builder::Basic::PDF::Bool->new(). it's giving boolean but make it ✨PDF✨. πŸ¦‹

⭐ PDFArray

PDFArray()

Creates an array via PDF::Builder::Basic::PDF::Array->new(). one lil' function, one whole array, iconic. πŸ‘‘

⭐ PDFDict

PDFDict()

Creates a dict via PDF::Builder::Basic::PDF::Dict->new(). dictionary but it's for PDFs and it's not giving Merriam-Webster, it's giving structure. πŸ’œ

⭐ PDFName

PDFName()

Creates a name via PDF::Builder::Basic::PDF::Name->new(). yes babe, names have a class now. 🌸

⭐ PDFNull

PDFNull()

Creates a null via PDF::Builder::Basic::PDF::Null->new(). the void, but make it a constructor. πŸ’€

⭐ PDFNum

PDFNum()

Creates a number via PDF::Builder::Basic::PDF::Number->new(). math girlies rise 🧚

⭐ PDFString

PDFString($text, $usage)

Returns either PDFStr($text) or PDFUtf($text), depending on whether $text is already in UTF-8 and whether $usage permits UTF-8. If UTF-8 is not permitted, "downgrade" will be called on a UTF-8 formatted $text. 😭 (we don't make the rules, we just downgrade the encoding)

$usage is a single character string indicating the use for which $text is to be applied. Some uses permit UTF-8, while others (currently) forbid it:

  • 's' β€” an ordinary string, where UTF-8 text is permitted. βœ…
  • 'n' β€” a named destination, where UTF-8 text is permitted. βœ…
  • 'o' β€” an outline title, where UTF-8 text is permitted. βœ…
  • 'p' β€” a popup title, where UTF-8 text is permitted. βœ…
  • 'm' β€” metadata, where UTF-8 text is permitted. βœ…
  • 'f' β€” a file path and/or name, where UTF-8 text is currently not permitted. ❌
  • 'u' β€” a URL, where UTF-8 text is currently not permitted. ❌
  • 'x' β€” any other usage where UTF-8 text is not permitted. ❌
bestie the letters matter. pick the wrong one and your pretty emoji text is getting downgraded. 🫠

⭐ PDFStr

PDFStr()

Creates a string via PDF::Builder::Basic::PDF::String->new().

DEPRECATED. It is preferable that you use "PDFString" instead. 🚨

⭐ PDFStrHex

PDFStrHex()

Creates a hex-string via PDF::Builder::Basic::PDF::String->new(). hexadecimal girlies, this one's for you πŸ”₯

⭐ PDFUtf

PDFUtf()

Creates a utf8-string via PDF::Builder::Basic::PDF::String->new().

DEPRECATED. It is preferable that you use "PDFString" instead. 🚨

and that's the whole page, bestie, we ate and left zero crumbs πŸ“

this cutie was brought to you by perl v5.42.0, dated 2026-01-17, under the PDF::Bu...F::Utils(3) header β€” mwah πŸ’‹

πŸ“¦ where this page comes from