Forum How do I...?

Automatic Landscape rotation

Bala
Does Prince have the capability to change portrait trim into landscape trim automatically for wider table/figures in prince natural flow?

Currently, the larger tables/figures are overlapping in portrait layout, so I'm doing the manual changes in CSS/HTML markup for landscape layout.

Manual changes:
@page wide {
prince-rotate-body: -90deg;
}

table.landscape, figure.landscape
{
page:wide;
}

<table></table> to <table class="landscape"></table>
<figure></figure> to <figure class="landscape"></table>

Thanks,
Bala




mikeday
You can specify the prince-trim property on the @page rule.
Bala
I have specified the trim in CSS.

@page {size: 210mm 276mm;}
Bala
Can I have some examples?
mikeday
I'm not sure what you are trying to do, I thought you were enabling crop marks and specifying at trim rectangle outside the visible page area.
Balaa
Is this possible to rotate the table in landscape format automatically through prince XML, If the wider table is not fit in portrait layout?

mikeday
No, this would require detecting the situation with JavaScript and re-running Prince with different CSS.