rotate table
hi,
I am working with some tables that are too wide, so I am rotating them -90 degrees. The problem is that the height of the table (that is, the width of the table before rotating) is still the width of the page. Is there a way to adjust the table so that it's height is the height of the page?
thanks!
You would need to specify the appropriate width yourself, or rotate the page instead:
@page {
prince-rotate-body: landscape
}
thanks Mike. I tried it with an image (instead of a table) and I don't find the way:
<p>text text text<p>
<p style="@page {transform: rotate(-90deg); prince-rotate-body: landscape; }"><img src="image.jpg" alt="image" /></p>
<p>text text text<p>
-----------------
If I use style="transform: rotate(-90deg);", the image does rotate but it's not resized correctly and part of the image overlaps the text before and after (in this case, Prince is simply rotating the image, and I don't know how to insert the @page and prince-rotate-body in the inline style).
Please let me know.
Thanks
It requires using a named page:
@page wide {
prince-rotate-body: landscape
}
<p style="page: wide">...</p>
Here "wide" is just an arbitrary name; note that this will force a page break before and after the paragraph.
The code worked ok. But the page numbers disappeared. I tried to add something like this:
@page wide:right
{
@top-left {
content: string(book-title);
vertical-align: left;
}
@top-right {
content: counter(page);
vertical-align: right;
}
}
@page wide:right
{
@top-left
{
content: string(book-title);
vertical-align: left;
}
@top-right {
content: counter(page);
vertical-align: right;
}
}
But the page numbers are still missing. Any idea of how I could add the page numbers in this rotated page?
Thanks
Hi,
Please let me know if there is a way to tackle this problem (page header and page number disappearing after rotating the page).
Thanks
This has @page wide:right twice, should one of them be :left?
yes, thanks!
just one last query: when I apply the <div wide> to the table that must be rotated, how can make the following paragraph (that starts in a new page) to have the same properties of normal paragraphs in normal @page?
This is because right now, the following paragraph is having a different indent to normal paragraphs, and has an extra space/margin above.