opensubscriber
   Find in this group all groups
 
Unknown more information…

d : dev-tech-layout@lists.mozilla.org 15 March 2012 • 8:56AM -0400

Re: WebPrintAPI Proposal
by Jet Villegas

REPLY TO AUTHOR
 
REPLY TO GROUP




IIUC you're asking that we implement the default behavior for CSS3 Paged Media margin boxes:

Margin boxes have an initial value of zero for padding, border and margin. The default height of top boxes is the value of the page box's top margin. The default height of the bottom boxes is the value of the page box's bottom margin.
The initial value for 'content' is 'none'. The initial 'width' and 'height' of margin boxes is 'auto'.

http://www.w3.org/TR/2006/WD-css3-page-20061010/#populating-margin-boxes

In other words, we won't be rendering any content for headers or footers.

You're also asking that we implement page size, and portrait vs. landscape:
http://www.w3.org/TR/2006/WD-css3-page-20061010/#page-size

Will that do the trick for the pdf.js use cases?

-- Jet

>

We need to implement the CSS3 stuff anyway. How about:
-- Implement CSS3 Paged Media sufficient to make headers/footers and
margins go away, select page orientation and size. That shouldn't be too
hard.
-- Add an event to canvas that fires per-page during printing to render
that canvas content while we're printing the page it's on. This event would
provide a special canvas context that's compatible with the 2d interface
but internally renders at higher resolution (or possibly emits PS/PDF
directly).
Then you could create a print document that's just a series of canvases,
with the appropriate CSS to remove headers/footers/margins etc, and as we
print each page we'll run the callback on each canvas to paint it more
accurately. Any temporary resources could be thrown away after painting
that page.
_______________________________________________
dev-tech-layout mailing list
dev-tech-layout@list...
https://lists.mozilla.org/listinfo/dev-tech-layout

Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

Related Messages

opensubscriber is not affiliated with the authors of this message nor responsible for its content.