Forum How do I...?

Rotate table - table position sitting problem on the page

Bayanna
Hello there,

I'm getting a problem for Table rotate, I can see the table transform done correctly to the generated PDF, but the problem that I'm concerning is text are not sitting properly onto the page, and the text goes cut-off at the margins.

I've attached the files (html, css and pdf), if would want to take a look in detail, I'm using Prince XML 9.0.

I would really appreciate your help in this matter.

Thank you!

Regards,
Bayanna
  1. Table Rotate issue.zip242.5 kB
mikeday
I think you might prefer to make a landscape page?
@page {
    size: A4 landscape
}
Bayanna
Hi,

Yes, setting up the page layout to Landscape is working fine, thank you.

Just to confirm> is there any way if I could rotate the Page using CSS from landscape to portrait? So all the pages in the book should be consistent for the orientation.

However I exited to ask you that can this be not possible to go with Portrait layout using CSS for table rotate (multi-page content) that I have shared in the earlier post?

Thanks,
Bayanna Getteboina
mikeday
I am a little confused. Do you want most pages portrait, with some content rotate 90 degrees on some pages?
Bayanna
Hi,

I've set up my book in portrait, and I don't want to set any pages in Landscape in general. But when I post about table rendering issue when used transform: rotate(-90deg); for some of the wide tables, the suggestion was to go with Landscape for particular tables.

Hope this makes sense.

Can you please brief me about the two queries updated in previous post?

Thanks,
Bayanna
mikeday
Right. You can make only some pages landscape using named pages, however this will affect the page headers/footers, which you may not want.

The trouble with CSS transforms is that it is based on absolute positioning, so it does not take page breaking into account. So it is possible for the table to run off the page after being rotated 90 degrees.

Perhaps what you need is a landscape page body for the table, but with the page headers/footers still in the portrait orientation? We can't do this yet, but we do plan to add support for it in future.
Bayanna
Thanks for your explanation.

Bayanna
christin
Hei,

I want to do the same like Bayanna currently - a landscape page body for the table but with the page in portrait orientation. Unfortunately I have not found a property to get these result. Do you add a property until now?

Regards,
Christin
mikeday
Actually yes, we did! I must have forgotten to update this forum thread. Please try this:
@page {
    prince-rotate-body: portrait
}


You can also specify "prince-rotate-body: 90deg".
vijay.v
I am using same style but getting blank area when the table breaks to new page, how should avoid this ?

https://prnt.sc/GOGDzPfMBtDO