PDF::Builder::Basic::PDF::Utils - Utility functions for PDF library
A set of utility functions to save the fingers of the PDF library users!
Creates a Bool via PDF::Builder::Basic::PDF::Bool->new()
Creates an array via PDF::Builder::Basic::PDF::Array->new()
Creates a dict via PDF::Builder::Basic::PDF::Dict->new()
Creates a name via PDF::Builder::Basic::PDF::Name->new()
Creates a null via PDF::Builder::Basic::PDF::Null->new()
Creates a number via PDF::Builder::Basic::PDF::Number->new()
Returns either PDFStr($text) or PDFUtf($text), depending on whether $text is already in UTF-8 and whether the $usage permits UTF-8. If UTF-8 is not permitted, downgrade will be called on a UTF-8 formatted $text.
$text
$usage
downgrade
$usage is a single character string indicating the use for which $text is to be applied. Some uses permit UTF-8, while others (currently) forbid it:
An ordinary string, where UTF-8 text is permitted.
A named destination, where UTF-8 text is permitted.
An outline title, where UTF-8 text is permitted.
A popup title, where UTF-8 text is permitted.
metadata, where UTF-8 text is permitted.
A file path and/or name, where UTF-8 text is currently not permitted.
A URL, where UTF-8 text is currently not permitted.
Any other usage where UTF-8 text is not permitted.
Creates a string via PDF::Builder::Basic::PDF::String->new()
DEPRECATED. It is preferable that you use PDFString instead.
PDFString
Creates a hex-string via PDF::Builder::Basic::PDF::String->new()
Creates a utf8-string via PDF::Builder::Basic::PDF::String->new()
To install PDF::Builder, copy and paste the appropriate command in to your terminal.
cpanm
cpanm PDF::Builder
CPAN shell
perl -MCPAN -e shell install PDF::Builder
For more information on module installation, please visit the detailed CPAN module installation guide.