Text::PDF::Array(3) User Contributed Perl Documentation Text::PDF::Array(3)

# [NAME](#NAME)

Text::PDF::Array - Corresponds to a PDF array. Inherits from PDF::Objind

# [INSTANCE VARIABLES](#INSTANCE_VARIABLES)

This object is not an array but an associative array containing the array of elements. Thus, there are special instance variables for an array object, beginning with a space

[var](#var)

Contains the actual array of elements

# [METHODS](#METHODS)

## [PDF::Array-&gt;new($parent, @vals)](#PDF::Array)

Creates an array with the given storage parent and an optional list of values to initialise the array with.

## $a-&gt;outobjdeep($fh, $pdf)

Outputs an array as a PDF array to the given filehandle.

## [$a-&gt;removeobj($elem)](#$a)

Removes all occurrences of an element from an array.

## [$a-&gt;elementsof](#$a~2)

Returns a list of all the elements in the array. Notice that this is not the array itself but the elements in the array.

## [$a-&gt;add\_elements](#$a~3)

Appends the given elements to the array. An element is only added if it is defined.

## [$a-&gt;val](#$a~4)

Returns the value of the array, this is a reference to the actual array containing the elements.

## [$d-&gt;copy($inpdf, $res, $unique, $outpdf, %opts)](#$d)

Copies an object. See **Text::PDF::Objind::Copy()** for details

2026-10-03 perl v5.44.0

---

Document: Text::PDF::Array(3pm) from perl-text-pdf 0.31-r0 (Chainguard OS)
