This is an archived forum post. The information may be outdated. Contact us if you have any questions.

Support for max-width on table?

CarmenGrantham wrote on 2013-06-27:
Hi guys

Is there support for max-width on table?

The width of my body is 800px but there are cases when table width is greater than this and it is causing the PDF to reduce the font size so it all fits on the page. I cannot change the table width as it is coming straight from a database.

I've tried using max-width and it works fine in a browser but not when it is parsed through pdfcrowd. I've attached the html.

Is there any other way I can get around this?

support wrote on 2013-06-27:
Hi Carmen,

Pdfcrowd uses the same layout engine as Google Chrome. You are saying the the html works fine in a browser but when I open it in Google Chrome, the table width is 1498 pixels. It seems that max-width set on the table has no effect. Or am I missing something?
CarmenGrantham wrote on 2013-06-30:
Sorry I should have been more specific. I was using Firefox where it does reduce the width of the table to 809px (not quite 800 but close enough). I didn't realise Pdfcrowd used Chrome engine, but as you say it doesn't reduce the width.

Any idea on another method I can use to keep the table within the width limits of the body?

support wrote on 2013-07-01:
Hello Carmen,

I would recommend that you set the table width to 100% and also define cell widths using percentages instead of pixels.