strzibny / invoice_printer

Super simple PDF invoicing
MIT License
876 stars 71 forks source link

additional notes run off the page #49

Closed combinatorist closed 3 years ago

combinatorist commented 4 years ago

It appears the template only leaves room for one line of notes. If you write too much, it will word wrap, but the additional lines of words won't appear on the page. If you use explicit new lines in the note section than those lines won't appear either.

ghost commented 4 years ago

I'm also getting the exact same behavior. If I put in the following code

    invoice = InvoicePrinter::Document.new(
      ...
      note: ""Jack K\n123 Fake Street""
    )

Only "Jack K" will display in the note.

(My use-case is that I allow my end-users to enter any data they like in this field, in order to comply with local legislation. Sometimes this requires multiple lines)

strzibny commented 3 years ago

It's probably because the position is fixed and there is no space. We could support longer notes by adjusting the initial position based on what's in the note. I agree that this might be needed in the wild.

strzibny commented 3 years ago

Done! You can check master if it does what you need. I did not limit the number of lines for now.