Forum How do I...?

Overflow issues in PDF

Balaa
Hi Mike,

I found text overflow issue in output PDF file. I have tried with CSS property "overflow" and "white-space", but it's not controlled.

Please find the attached image of issues.

Thanks,
Bala
  1. Equation_overflow.png339.7 kB
  2. Table_overflow.png315.9 kB
mikeday
Applying "overflow: hidden" on the containing block should work, if it has "max-width: 100%" to make sure that its width is not wider than the page.
Balaa
It's works, but table last column content is hidden. Is there any possible to rotate the longer tables in landscape mode automatically if it's not fit in the page width.
mikeday
No, this requires manual intervention, or using JavaScript.
Balaa
It can be controlled through Javascript, but it's difficult to identify where the longer table paginated in the PDF file, because prince-rotate-body can applied for particular page.
mikeday
You can put the table on a named page:
@page wide {
    prince-rotate-body: landscape
}

table.big { page: wide }
Balaa
Will write javascript to identify the wider tabels and apply wide style. This helps.

Thanks