W3C home > Mailing lists > Public > www-style@w3.org > April 2003

Re: @page { size: A4 }

From: Daniel Glazman <glazman@netscape.com>
Date: Fri, 11 Apr 2003 03:54:11 +0200
Message-ID: <3E962043.9010404@netscape.com>
To: Michael Day <mikeday@yeslogic.com>
CC: www-style@w3.org, "REFSTRUPJACOB (HP-Vancouverex1)" <jacob_refstrup@hp.com>

Michael Day wrote:

> This is a proposal for an extension to the page size property to take
> named paper sizes in addition to lengths, to make it easier for users to
> specify standard paper sizes without resorting to a ruler.
> 
> Syntax:
> 
> @page { size: identifier1 [identifier2] }
> 
> identifier1 is the case-insensitive name for a standard paper size.
> http://www.cl.cam.ac.uk/~mgk25/iso-paper.html has a suitable list of
> standard paper size names and dimensions, for example:
> 
>  A4 : 210mm x 297mm
>  A5 : 148mm x 210mm
>  ...

This makes perfect sense to me.

> identifier2 is an optional orientation of either "portrait" or
> "landscape". Without this it would be impossible to request a landscape A4
> size page for example without resorting to a ruler again.
> 
> Examples:
> 
> @page { size: A4 }
> @page { size: A4 landscape }
> @page { size: US-Letter }
> @page { size: 210mm 297mm }  /* old syntax still acceptable */

This implies a light change of the grammar of the 'size' property but, again, 
it makes perfect sense to me. What about:

      <length>{1,2} | auto | [ <page-size> || [ portrait | landscape ] ]

where <page-size> is one of a0, a1, a2, a3, a3, a4, a5, b0, b1, b2, b3, b4, b5, 
us-letter, us-legal, us-executive, us-ledger ? What about JIS sizes for Japan ?

I was thinking of using a string instead of so many keywords but using CSS 
error handling to throw away a 'size' declaration with an unrecognized size 
keyword and therefore fallback to system's default seem to me better.

Jacob, what do you think ?

> Implementation:
> 
> YesLogic Prince implements this property in the manner described above
> (http://yeslogic.com/prince). It supports all of the ISO paper sizes and
> also "US-Letter", "US-Legal", "US-Executive" and "US-Ledger" for the
> convenience of US users.

Excellent :-) Can you give us the precise definition (in css length units) for 
all these keywords please ?

</Daniel>
Received on Thursday, 10 April 2003 21:54:01 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:20 GMT