---
name: "PDF::Builder::Basic::PDF::Name"
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::Name"
---

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

Stores PDF names (things beginning with /) Inherits from PDF::Builder::Basic::PDF::String

## NAME

PDF::Builder::Basic::PDF::Name - Stores PDF names (things beginning with /)

Inherits from PDF::Builder::Basic::PDF::String

## METHODS

### from\_pdf

```
    $n = PDF::Builder::Basic::PDF::Name->from_pdf($string)
```

Creates a new string object (not a full object yet) from a given string. The string is parsed according to input criteria with escaping working, particular to Names.

### convert

```
    $n->convert($string, $pdf)
```

Converts a name into a string by removing the / and converting any hex munging.

### as\_pdf

```
    $s->as_pdf($pdf)
```

Returns a name formatted as PDF. `$pdf` is optional but should be the PDF File object for which the name is intended if supplied.

### string\_to\_name

```
    PDF::Builder::Basic::PDF::Name->string_to_name($string, $pdf)
```

Suitably encode the string `$string` for output in the File object `$pdf` (the exact format may depend on the version of `$pdf`).

### name\_to\_string

```
    PDF::Builder::Basic::PDF::Name->name_to_string($string, $pdf)
```

Suitably decode the string `$string` as read from the File object `$pdf` (the exact decoding may depend on the version of `$pdf`).  Principally, undo the hex encoding for PDF versions \> 1.1.
