On 04/17/2012 02:11 PM,
julian.viereck@goog... wrote:
>> The CSS3 Paged Media discussions on www-style are tagged with [css3-page].
>> Feel free to poke me with any questions; I'm the spec editor. And please
>> send comments about things that are stupid or broken to www-style so we
>> can fix them...
>
> One part of the spec that might need to get implemented for PDF.JS is the ability to specify the size of individual pages. If I get that right from the spec, this can be done like this:
>
> @page narrow { size: 4cm 4cm }
> div.foo { page: narrow }
>
> Can you please help me, what the expected behavior is in the following case:
>
> Assume the default page size is A4 and a div matching "div.foo" is at the very bottom of the first printed page. As it has a `page` property defined, the `@page narrow` properties get applied to the page the "div.foo" is on. But the page-size required the A4 page to shrink. As a consequence of the shrink process, the "div.foo" element is no longer on the same page as before, as it was at the very bottom and the page got smaller. In a consequence, the page that now contains the "div.foo" should get the narrow-page-size applied. But as the "div.foo" is no longer on the first page, the "@page narrow" doesn't apply to the first page anymore, and it size should be A4 again. But then the "div.foo" is on the first page again, the "@page narrow" get applied and ...
>
> Do you see the endless loop? I haven't read the entire spec, but from what I read the behavior in this case is not clear to me.
If div.foo is assigned a different 'page' value than its previous sibling,
it forces a page break. So the first page remains unaffected, and the
next page is 4cm x 4cm.
http://dev.w3.org/csswg/css3-page/#using-named-pages
~fantasai
_______________________________________________
dev-tech-layout mailing list
dev-tech-layout@list...
https://lists.mozilla.org/listinfo/dev-tech-layout
opensubscriber is not affiliated with the authors of this message nor responsible for its content.