---
name: "PDF::Builder::Basic::PDF::Array"
section: "3pm"
platform: "linux"
package: "perl-pdf-builder"
version: "3.028-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/PDF::Builder::Basic::PDF::Array"
---

# PDF::Builder::Basic::PDF::Array(3pm)

Corresponds to a PDF array Inherits from PDF::Builder::Basic::PDF::Objind

## NAME

PDF::Builder::Basic::PDF::Array - Corresponds to a PDF array

Inherits from PDF::Builder::Basic::PDF::Objind

## METHODS

### new

```
    PDF::Array->new($parent, @values)
```

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

### outobjdeep

```
    $a->outobjdeep($fh, $pdf)
```

Outputs an array as a PDF array to the given filehandle. It's unusual to need to call this method from user code.

### elements

```
    $a->elements()
```

Returns the contents of the array.

### add\_elements

```
    $a->add_elements(@elements)
```

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

### remove\_element

```
    $a->remove_element($element)
```

Removes all occurrences of an element from an array.

### val

```
    $a->val()
```

Returns a reference to the contents of the array.

### copy

```
    $a->copy($pdf)
```

Copies the array with deep-copy on elements which are not full PDF objects with respect to a particular `$pdf` output context.
