Post without Account — your post will be reviewed, and if appropriate, posted under Anonymous. You can also use this link to report any problems registering.
PDF::API2 v2.022 Perl 5.16.3 Windows 7 severity: Important The cr($vert_offset) method behavior does not appear to match its POD. Rather than being a vertical offset from the next line down (the wording is ambiguous), the code appears to place the new line relative to the CURRENT line, with vertical displacement in points. Thus, cr(0) overprints the current line because the current x,y is brought back to the start of the current line. A positive value moves above the current line, and a negative value below it. $self->lead is ignored. I have submitted to the maintainer a suggested change to the POD which documents how the code actually works. It might even be better (more intuitive) to change the code to go down (-y) by $self->lead, and then up by -$vert_offset or down by +$vert_offset (the idea being to go DOWN by leading+offset, rather than swapping signs around).
=item $content->cr()=item $content->cr($vertical_offset)When called I<without> an argument, moves the cursor to the start of the line, then down (-y) by the amount of leading in use (moves to the beginning of the next line down).An offset can be passed as an argument to override the current leading value. The cursor will be moved to the start of the line, thena positive offset will move the cursor up, and a negative offset will move the cursor down. An offset of 0 (zero) will only move the cursor to the start of the line, with no vertical adjustment (a simple Carriage Return). This can be used for overprinting a line.The C<distance()> method can be used to go down to the beginning of the next line, and then adjust both vertically and horizontally, if that is needed.