Forum Bugs

table too wide - runs off page

zebedee
Hi,
I'm (still) having to deal with directly converting the HTML/CSS from a Word document into a PDF. (i.e. no manual clean up in between, although I can run a regex on the code or add an extra style sheet if you think that'll help). So as you can imagine, I'm dealing with nasty inflated code, that sometimes has conflicting style and html attributes.

Here is some sample code that I've tried to narrow down where the issue is happening:
https://kryten.navarik.com/~jfowlie/table-width-issue.html

You can see the output from 5.1r9 here:
https://kryten.navarik.com/~jfowlie/table-width-issue.pdf

Now if you view it in IE, Opera or Mozilla (and do a print preview), they all display it how I'm hoping for Prince to deal with the code, but unfortunately, Prince doesn't. So it means that the table is getting cut off in the PDF.

Any suggestions for a workaround (extra css I could add to override the crappy MS code)? Or is this something you'd be able to fix in the next version of Prince?
mikeday
The only way to fix this with Prince 5.1 is to remove the width attributes from the table cells, as they will override whatever width is specified in the CSS style.

In a future release of Prince we will make the width attribute handling more flexible, so that it can be overridden by other CSS rules. This will make it easier to handle these kinds of documents.