PDF::Builder::Util(3pm) | User Contributed Perl Documentation | PDF::Builder::Util(3pm) |
PDF::Builder::Util - utility package for often-used methods across the package.
See the source of PDF::Builder::Resource::Colors for a complete list.
Please Note: This is an amalgamation of the X11, SGML and (X)HTML specification sets.
There are many color model conversion and input conversion routines defined here.
There are a number of functions here to handle stream filtering.
See the file "uniglyph.txt" for a complete list.
Please Note: You may notice that apart from the 'AGL/WGL4', names from the XML, (X)HTML and SGML specification sets have been included to enable interoperability towards PDF.
There are a number of functions here to handle various aspects of glyph identification.
Dimensions are in points.
Otherwise, array (0,0, 612,792) (US Letter dimensions) is returned.
See the source of PDF::Builder::Resource::PaperSizes for the complete list.
Convert a string "number [unit]" to the value in desired units. Units are case-insensitive (the input is first folded to lower case).
Supported units: mm, cm, in (inch), pt (Big point, 72/inch), ppt (printer's point, 72.27/inch), pc (pica, 6/inch), dd (Didot point, 67.5532/inch), and cc (Ciceros, 5.62943/inch). More can be added easily. Invalid units are a fatal error.
$type is for validation of the input $string's numeric value. The first character is i for an integer is required (no decimal point), or f for other (floating point) numbers. Next is an optional c to indicate that an out-of-range input value is to be silently clamped to be within the given range (the default is to raise a fatal error). Finally, an optional range expression: {lower limit,upper limit}. The limits are either numbers or * (to indicate +/- infinity (no limit) on that end of the range). { is [ to say that the lower limit is included in the range, while ( says that the lower limit is excluded from the range. Likewise, } is ] for included upper limit, and ) for excluded. The limits (and silent clamping, or fatal error if the input is out of range) are against the input value, before conversion to the output units.
Example types:
$default_units is a required string, giving the units that the input is converted to. For example, if the default units are 'pt', and the input string '2 in', the output value would be '144'. If the input string has no explicit units, it is assumed to be in the default units (no conversion is done).
2023-01-24 | perl v5.36.0 |