Forum Bugs

Table columns not rendered correctly.

ionel
Hi!

I am trying to convert a table that has another nested table in the header, and a big footer, the problem is that the content of the main table body is not displayed as expected (please see the attached files).

From my checks, this problem seems to be influenced by the footer and header width.

Could you please check if this is a price XML bug or is something I am doing wrong?
Thank you!
  1. expected_output.png4.7 kB
  2. input.html2.5 kB
  3. output.pdf29.1 kB
howcome
Hmm, it seems Prince is confused by the wide footer:
<div style="width: 1000px;">FOOTER CONTENT</div>

If you remove the style attribute, the problem goes away. Probably something Prince should fix, though.

Edited by howcome

pmihai
Hello Mr Håkon,

Removing the width is not always an option, the footer may require some disclaimers which do require precise formatting. Expressing the width as 100% also does not help when the contents within - exceed the size of the main table.

The issue represented above is an over-simplified example of a real issue we are facing in production with some delivery document templates where the footer is customizable: As soon as the footer contains additional tables that exceed the width of the main table, any attempt to make use of prince-shrink-to-fit breaks the rendering in A4, Letter and many other standard formats.

In case the main table is already bigger than the footer contents, everything works well in all formats.

We also find it extremely odd (and possibly a good clue to follow-up on) that when attempting to generate a PDF of the exact same HTML while targeting A5 paper format (or in other words: a format where the total width of the document is less than both the footer and the main table) - it renders it as expected and mimics the browser behavior.

Looking forward to a fix or any other CSS tricks that could help prince execute a correct render.

  1. Browser Preview.png58.2 kB
    Sample of a browser preview
  2. PDF Preview.png48.4 kB
    Actual PDF Output
pmihai
Any workaround on this topic would be highly appreciated. Or any insights as to when this issue could be fixed.
wangp
Does it help if you delete the min-width property on the table cell?
            td.status {
                width: 10px;
                padding: 0;
                /*min-width: 10px;*/
                max-width: 10px;
            }