.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "PDF::Builder::Basic::PDF::Utils 3" .TH PDF::Builder::Basic::PDF::Utils 3 2023-12-21 "perl v5.38.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME PDF::Builder::Basic::PDF::Utils \- Utility functions for PDF library .SH DESCRIPTION .IX Header "DESCRIPTION" A set of utility functions to save the fingers of the PDF library users! .SH METHODS .IX Header "METHODS" .SS PDFBool .IX Subsection "PDFBool" .Vb 1 \& PDFBool() .Ve .Sp .RS 4 Creates a Bool via PDF::Builder::Basic::PDF::Bool\->\fBnew()\fR .RE .SS PDFArray .IX Subsection "PDFArray" .Vb 1 \& PDFArray() .Ve .Sp .RS 4 Creates an array via PDF::Builder::Basic::PDF::Array\->\fBnew()\fR .RE .SS PDFDict .IX Subsection "PDFDict" .Vb 1 \& PDFDict() .Ve .Sp .RS 4 Creates a dict via PDF::Builder::Basic::PDF::Dict\->\fBnew()\fR .RE .SS PDFName .IX Subsection "PDFName" .Vb 1 \& PDFName() .Ve .Sp .RS 4 Creates a name via PDF::Builder::Basic::PDF::Name\->\fBnew()\fR .RE .SS PDFNull .IX Subsection "PDFNull" .Vb 1 \& PDFNull() .Ve .Sp .RS 4 Creates a null via PDF::Builder::Basic::PDF::Null\->\fBnew()\fR .RE .SS PDFNum .IX Subsection "PDFNum" .Vb 1 \& PDFNum() .Ve .Sp .RS 4 Creates a number via PDF::Builder::Basic::PDF::Number\->\fBnew()\fR .RE .SS PDFString .IX Subsection "PDFString" .Vb 1 \& PDFString($text, $usage) .Ve .Sp .RS 4 Returns either PDFStr($text) or PDFUtf($text), depending on whether \f(CW$text\fR is already in UTF\-8 and whether the \f(CW$usage\fR permits UTF\-8. If UTF\-8 is \fInot\fR permitted, \f(CW\*(C`downgrade\*(C'\fR will be called on a UTF\-8 formatted \f(CW$text\fR. .Sp \&\f(CW$usage\fR is a single character string indicating the use for which \f(CW$text\fR is to be applied. Some uses permit UTF\-8, while others (currently) forbid it: .IP 's' 4 .IX Item "'s'" An ordinary \fBstring\fR, where UTF\-8 text is permitted. .IP 'n' 4 .IX Item "'n'" A \fBnamed destination\fR, where UTF\-8 text is permitted. .IP 'o' 4 .IX Item "'o'" An \fBoutline title\fR, where UTF\-8 text is permitted. .IP 'p' 4 .IX Item "'p'" A \fBpopup title\fR, where UTF\-8 text is permitted. .IP 'm' 4 .IX Item "'m'" \&\fBmetadata\fR, where UTF\-8 text is permitted. .IP 'f' 4 .IX Item "'f'" A \fBfile path and/or name\fR, where UTF\-8 text is currently \fBnot\fR permitted. .IP 'u' 4 .IX Item "'u'" A \fBURL\fR, where UTF\-8 text is currently \fBnot\fR permitted. .IP 'x' 4 .IX Item "'x'" Any other usage where UTF\-8 text is \fBnot\fR permitted. .RE .RS 4 .RE .SS PDFStr .IX Subsection "PDFStr" .Vb 1 \& PDFStr() .Ve .Sp .RS 4 Creates a string via PDF::Builder::Basic::PDF::String\->\fBnew()\fR .Sp \&\fBDEPRECATED.\fR It is preferable that you use \f(CW\*(C`PDFString\*(C'\fR instead. .RE .SS PDFStrHex .IX Subsection "PDFStrHex" .Vb 1 \& PDFStrHex() .Ve .Sp .RS 4 Creates a hex-string via PDF::Builder::Basic::PDF::String\->\fBnew()\fR .RE .SS PDFUtf .IX Subsection "PDFUtf" .Vb 1 \& PDFUtf() .Ve .Sp .RS 4 Creates a utf8\-string via PDF::Builder::Basic::PDF::String\->\fBnew()\fR .Sp \&\fBDEPRECATED.\fR It is preferable that you use \f(CW\*(C`PDFString\*(C'\fR instead. .RE