S
S
Sergey Rozhkov2015-01-19 16:55:10
PHP
Sergey Rozhkov, 2015-01-19 16:55:10

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

3 answer(s)
S
Sergey Rozhkov, 2015-01-23
@SuperOrange

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.

R
Rishat Kadyrov, 2015-01-19
@laska

Usually generate PDF, not PNG.
There are no problems with PDF printing.

A
Andrey Bosonchenko, 2015-01-19
@andboson

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 question

Ask a Question

731 491 924 answers to any question