PDF::AP...::Array(3)

✨ NAME ✨

PDF::API2::Basic::PDF::Array β€” bestie, it's a low-level PDF array object 🫢

(also filed under the page name PDF::AP...::Array(3), from User Contributed Perl Documentation, in case you went looking for it in man)


πŸ¦‹ METHODS πŸ¦‹

πŸŽ€ PDF::Array->new($parent, @values)

Makes you a brand new array, no cap. You hand it a storage parent, plus an optional list of values to kick things off with β€” those values go straight into the array as its starting lineup πŸ’…

πŸ“ $a->outobjdeep($fh, $pdf)

Writes the array out as an actual PDF array, spilling it into the given filehandle. That's it, that's the whole job, and it eats ✨

🌸 $a->elements()

Gives you back what's inside the array. The contents. The whole vibe check of the array's insides πŸ‘‘

🌈 $a->add_elements(@elements)

Appends the elements you pass in onto the end of the array. Important detail bestie: an element only actually gets added if it is defined β€” so any undef in your list just silently doesn't make the cut. Fr fr πŸ™ˆ

πŸ’œ $a->remove_element($element)

Takes an element and removes all occurrences of it from the array. Not just the first one. Every single one. Gone. Periodt πŸ’€

🧚 $a->val()

Returns a reference to the contents of the array. Note that's a reference, not a copy β€” just so you know what you're holding πŸ’–

⭐ $a->copy($pdf)

Copies the array, doing a deep copy on the elements that are not full PDF objects β€” and it does that with respect to a particular $pdf output context. So yeah, the $pdf you pass in genuinely matters here, don't skip it πŸŽ€


okay that's the whole page, mwah πŸ’‹ This lil guy comes to you courtesy of perl v5.42.0, dated 2025-09-01 β€” stan a stable release, iykyk 🌟

πŸ“¦ 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