Answer the question
In order to leave comments, you need to log in
How to calculate the size of a cell or row in an html table in php?
The bottom line is that a data set (nomenclature) is generated, which should then be split into A4 sheets (html files) from which png is generated and after that a pack of png files is sent to the server.
Everything is implemented, but there is a problem with the fact that the sheets have different heights due to the fact that the rows are different. Somewhere the line is one line, somewhere with a long name the line is tripled.
Does anyone have similar experience?
Z.Y. Everything is generated on the server, outside the browser.
Answer the question
In order to leave comments, you need to log in
A monospace font was used where the character occupied 5px, and as a result, with a column width of 100px, 20 characters fit into 1 line, 20-40 are 2 lines, etc.
Usually generate PDF, not PNG.
There are no problems with PDF printing.
as an addition, if you need PNG so much: generate PDF and convert page by page to PNG
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question