Is there no concept of a cursor? #1511
Unanswered
jasonperrone
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm coming from the Ruby world where I use Prawn to create PDFs. I was trying to figure out what it is about pdf-lib that bothers me, and what I think it is is that I don't see where it does anything to keep track of your cursor and that you have to do it all yourself.
For example, I drawText some text and I have to provide the coordinates. Ok, fine. With Prawn, after I drew that text, it knew that the y coordinate has just moved down. A subsequent drawText would draw below the text I just drew.
With this lib it seems you need to keep track of your cursor position 100% yourself. If I draw a line of text at the top of the page and then I want to draw a second line I have to manually provide a new y to make sure that second line is beneath the first. The real rub is that if that second line wraps around and so it's taller than I thought, how do I know how much I need to move the y?
I mean... am I wrong about any of this? Kind of hoping I am.
Beta Was this translation helpful? Give feedback.
All reactions