Forum How do I...?

Fit table to the page size

clandestino
Hello,

I'am evaluating prince for documents generating.

I have a table with a lot of columns and when a generate the pdf, the table is truncated and I lose severals columns.
My question, is that a way to reduce the table like a zoom-out? Can we know with javascript the calculated table width to do some operations on the table to fit the page width?

Thanks in advance for you answers.
mikeday
Currently this requires a two-pass process: converting the document and using JavaScript to measure the final box tree, then generating new CSS and converting the document again. It is a little complex to setup but is doable.
clandestino
Hello mikeday,

Thank you for your reply. Can you give me exemple of the measurement?

Best regards
mikeday
Here is an example of using the JavaScript two-pass process to detect overflow.