Printable safe area paddings - Magic numbers manual page break wrap around for invoice description footer aesthetic?
slimlime opened this issue · 3 comments
jspdf-invoice-template/src/index.js
Line 484 in fb3bffe
jspdf-invoice-template/src/index.js
Line 489 in fb3bffe
Would we be correct in assuming that these magic numbers for 183mm and 270mm are directly proportional to the A4 dimensions for sizing?
both are 27mm below A4 paper dimensions 210mm 270mm
My first impression is that the y-coord (currentHeight
) potentially near the end of page should wrap to the next page.
Appears to be a hard-coded 27mm condition which may equate to about three lines of text?
Printable "safe area" aesthetic adjustments?
--
There are other number constants used to adjust as well throughout the code, I thought I would suggest this as one of the more accessible places to refactor
and whether the code duplication aligns here
jspdf-invoice-template/src/index.js
Line 390 in fb3bffe
jspdf-invoice-template/src/index.js
Line 395 in fb3bffe
Yeah, there is always a place for refactoring, and for sure I'll do it ASAP :)
Added in my TODO list. Reopen it if anything else.