J
Justin C
I'm using PDF::Reuse to produce output in a PDF template. The problems
I'm having are:
* I need to print currency values with two decimal places regardless of
whether the number has anything after the decimal point.
* I need to print values for weight with up to four digits after the
decimal point (if there are digits).
What PDF::Reuse is doing is only printing integars where there is
nothing after the decimal for my currency output, and printing fourteen
digits after the decimal in places where I need rounding.
I'm using the following to produce output:
prText($x, $y, $string)
$x and $y are horizontal and vertical coordinates to the location to
start printing $string.
Normally I'd use printf to force rounding or decimals where none are
displayed, but I can't see a way of using that here. The PDF::Reuse
documentation does't provide help on this problem either.
Does anyone have any suggestions on how to force, for example '34' to be
'34.00', and 7.[lots of digits] to truncate at 4 digits after the
decimal?
All pointers to documentation or suggestions gratefully received.
Justin.
I'm having are:
* I need to print currency values with two decimal places regardless of
whether the number has anything after the decimal point.
* I need to print values for weight with up to four digits after the
decimal point (if there are digits).
What PDF::Reuse is doing is only printing integars where there is
nothing after the decimal for my currency output, and printing fourteen
digits after the decimal in places where I need rounding.
I'm using the following to produce output:
prText($x, $y, $string)
$x and $y are horizontal and vertical coordinates to the location to
start printing $string.
Normally I'd use printf to force rounding or decimals where none are
displayed, but I can't see a way of using that here. The PDF::Reuse
documentation does't provide help on this problem either.
Does anyone have any suggestions on how to force, for example '34' to be
'34.00', and 7.[lots of digits] to truncate at 4 digits after the
decimal?
All pointers to documentation or suggestions gratefully received.
Justin.