sandal/prawn — Issue #318: Last line is not rendered
Author: gioele
Created: 2012-01-15 13:49:01+00:00
State: open

The code in https://gist.github.com/1615898 (reduced from https://github.com/gioele/papersize/blob/master/gen-papersize-pdf.rb) will produce a PDF in which the last line generated with `pdf.line` will not be rendered.

Lines are generated with in a loop with

bb = pdf.bounds
v_center = pdf.cursor + 0.8.mm

pdf.line [bb.left, v_center], [bb.right, v_center]

The bounds are changed in the initial part of the loop, so each line is positioned in a different spot. This code works flawlessly for all the different bounding boxes except for the last. In you uncomment the "B5" line in the gist, the generated code will render all the lines (including the one not shown precedently) but not the B5 line, that now happens to be the last one.