DOKK / manpages / debian 12 / libpdf-builder-perl / PDF::Builder::Basic::PDF::Name.3pm.en
PDF::Builder::Basic::PDF::Name(3pm) User Contributed Perl Documentation PDF::Builder::Basic::PDF::Name(3pm)

PDF::Builder::Basic::PDF::Name - Inherits from PDF::Builder::Basic::PDF::String and stores PDF names (things beginning with /)

$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.
$n->convert($string, $pdf)
Converts a name into a string by removing the / and converting any hex munging.
$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.
Suitably encode the string $string for output in the File object $pdf (the exact format may depend on the version of $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.
2023-01-24 perl v5.36.0