Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion WebPrintAPI Proposal

Received: by 10.68.230.165 with SMTP id sz5mr202025pbc.1.1331772986747;
        Wed, 14 Mar 2012 17:56:26 -0700 (PDT)
Path: h9ni27061pbe.0!nntp.google.com!news2.google.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!nntp.mozilla.org!news.mozilla.org.POSTED!not-for-mail
NNTP-Posting-Date: Wed, 14 Mar 2012 19:56:26 -0500
Return-Path: <jville...@mozilla.com>
X-Original-To: dev-tech-lay...@lists.mozilla.org
Delivered-To: dev-tech-lay...@lists.mozilla.org
X-Virus-Scanned: amavisd-new at mozilla.org
Received-SPF: none (mozilla.com: No applicable sender policy available)
	receiver=notorious.mozilla.org; identity=mailfrom;
	envelope-from="jville...@mozilla.com";
	helo=zimbra1.shared.sjc1.mozilla.com; client-ip=10.2.72.15
Date: Wed, 14 Mar 2012 17:56:22 -0700 (PDT)
From: Jet Villegas <j...@mozilla.com>
To: rob...@ocallahan.org
In-Reply-To: <CAOp6jLaqsp_MO=GYUseQG1w7Qp9+2nRX8gMa5SV2Twu7H+yqtw@mail.gmail.com>
Subject: Re: WebPrintAPI Proposal
MIME-Version: 1.0
X-Originating-IP: [67.169.43.128]
X-Mailer: Zimbra 7.1.4_GA_2568 (ZimbraWebClient - FF3.0 (Mac)/7.1.4_GA_2555)
Cc: Julian Viereck <julian.vier...@googlemail.com>,
	dev-tech-lay...@lists.mozilla.org
X-BeenThere: dev-tech-lay...@lists.mozilla.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: Jet Villegas <j...@mozilla.com>
List-Id: Web page layout <dev-tech-layout.lists.mozilla.org>
List-Unsubscribe: <https://lists.mozilla.org/options/dev-tech-layout>,
	<mailto:dev-tech-layout-requ...@lists.mozilla.org?subject=unsubscribe>
List-Post: <mailto:dev-tech-lay...@lists.mozilla.org>
List-Help: <mailto:dev-tech-layout-requ...@lists.mozilla.org?subject=help>
List-Subscribe: <https://lists.mozilla.org/listinfo/dev-tech-layout>,
	<mailto:dev-tech-layout-requ...@lists.mozilla.org?subject=subscribe>
Newsgroups: mozilla.dev.tech.layout
Message-ID: <mailman.15183.1331772985.31724.dev-tech-layout@lists.mozilla.org>
Lines: 32
X-Usenet-Provider: http://www.giganews.com
NNTP-Posting-Host: 63.245.208.166
X-AuthenticatedUsername: NoAuthUser
X-Trace: sv3-N3C24Mr3sNpmbiuoFkYdI1QbBkrbLi28aqBhYwr0pHsVBRHDOGWRiipNkMdLJwf1HyRvjp4jtcNMu99!aS6QpNRxFP/RzoE8CqwYcgdHYx7EdX7iSWUKsBsyM1qJ0YmGbMwYTuQafJn7KTgwrHQvtvggYwUk!f11/7T3ysVM0AP8csJ2rE6B3H8g7A3++mHwrNdSR
X-Complaints-To: ab...@mozilla.org
X-DMCA-Complaints-To: ab...@mozilla.org
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
X-Original-Bytes: 4020
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit

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.