I'm using the Prawn Ruby library (http://prawn.majesticseacreature.com/) to generate some pdf documents. I draw a table without any problem. Next, I want to insert some lines after the table for various people's signatures. Before I draw the lines, I would like to see if there is enough remaining room on the page to fit all the signatures. If not, I will start a new page and put the signature lines there. However, in order to determine if enough room remains on the page, I need to know what the current cursor position is after drawing the table. I can't for the life of me figure out how to do this. Any ideas?
Asked
Active
Viewed 7,075 times
1 Answers
13
Of course, after entering the question, I immediately figure it out. The 'y' and 'y=' methods in the Document class allow you to get and set the current y position, which is all that is necessary.

David
- 1,188
- 12
- 15
-
4I don't see `#y` in the Document class, only `#y=`. I was using `pdf.cursor` inside my document to view the cursor's current position. – Tass Jun 30 '14 at 16:28