> 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. 

Also, what should happen if there are two divs on the page, both referring to 
"@page" definitions but have different page-sizes applied. Should the first 
div's page-size win over the second?

Best,

Julian
_______________________________________________
dev-tech-layout mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-layout

Reply via email to