Forum Feature requests

Avoid assumption that PDF pages should be uniform size

JohnClarke
Is there a way to limit pagebreaks when-and-only-when there is an element that has a "page-break-before" attribute? I want to avoid the assumption that PDF pages should be a uniform size.

Use case: I merge several XHTML documents into one and then generate a single PDF using Prince. Each elemental document had its own header and each has a slightly different printed page size. The final document is not meant to be printed (only viewed on screen) and I want avoid the white-space that comes with having uniform page sizes.

Is this something I can do with CSS? Ideas? Suggestions?

:?:

John Clarke
Cornerstone Systems Northwest Inc.

mikeday
There is no way to make pages "as big as necessary" up until the next forced page break.

However, if you are using named pages it is possible to set multiple different page sizes for different parts of the document, like this:

@page section1 { size: A4 }
@page section2 { size: A4 landscape }
@page section3 { size: US-Letter }

div.section1 { page: section1 }
div.section2 { page: section2 }
div.section3 { page: section3 }
Lynx
JohnClarke wrote:
Is there a way to limit pagebreaks when-and-only-when there is an element that has a "page-break-before" attribute?
...
Is this something I can do with CSS? Ideas? Suggestions?


Yes, but as Michael wrote this is not possible in case of Print media.
For this purpose there is Projection media type in CSS2/2.1
At the moment this media type is supported by Opera browser [1]
(it is triggered in full screen mode) and QuickShow [2] presentational tool.

Most frequently Projection media is used for presentations (standard XML/CSS based alternative for Powerpoint) and I'am not sure whether it should be supported by Prince at all.

[1] Opera browser http://www.opera.com
[2] Quick Show http://www.philburns.com/quickshow.html
JohnClarke
Yes, your comments make sense. I was only wondering whether it was possible, not suggesting that Prince should add this as a feature (possibly this topic is in the wrong section?). :)

John Clarke
Cornerstone Systems Northwest Inc.

mikeday
Come to think of it, PDF can do presentations too, as the Adobe Reader has a presentation mode and PDF even has support for automated transitions with transition effects (wipes etc.)

That said, I'm not sure if Prince should evolve into a PowerPoint replacement just yet :)