Open Crissov opened 4 years ago
PS: For consistence, I should probably also be proposing standard envelope sizes besides the generic C (and B) series, but I'm still researching this matter, e.g. which 2:1 combined formats, like C6/C5, should be considered.
Format | Size |
---|---|
Invite | 220mm 220mm |
ISO DL | 220mm 110mm |
DL+ | 225mm 112mm |
DL Max, Compact | 235mm 125mm |
Italian | 230mm 110mm |
C7/C6 | 162mm 81mm |
ISO C6/C5, Postfix, DL+ | 229mm 114mm |
B6/C4 | 324mm 125mm |
E4 | 400mm 280mm |
I'd like to chime in on this suggestion. Doctors' prescriptions and postcards are often printed on A6 sized paper, for instance.
For what it’s worth, Ghostscript supports keywords for ISO A0–A10, B0–B6, C0–C6, JIS B0–B6, ANSI A–F (incl. aliases for Letter, Tabloid/Ledger), Legal, Half-Letter, Foolscap (8.5in 13in
), Architecture A–E, CAN PA4, Hagaki. They are specified as integer amounts of PS points.
A0
… A10
B0
… B10
C0
… C10
id-1
: 85.60mm x 53.98mmid-2
: 105.0mm x 74.0mmid-3
: 125.0mm x 88.0mmUS-Letter
: 8.5in x 11.0inUS-Legal
: 8.5in x 14.0inUS-Executive
: 7.25in x 10.5inUS-Ledger
: 17.0in x 11.0inUS-Tabloid
: 11.0in x 17.0inUS-Government
: 8.0in x 11.0inUS-Statement
: 5.5in x 8.5inUS-Folio
: 8.5in x 13.0inarch-a
: 9.0in x 12.0inarch-b
: 12.0in x 18.0inarch-c
: 18.0in x 24.0inarch-d
: 24.0in x 36.0inarch-e1
: 30.0in x 42.0inarch-e
: 36.0in x 48.0inimperial-folio
: 15.0in x 22.0inimperial-quarto
: 11.0in x 15.0inimperial-octavo
: 7.5in x 11.0inroyal-folio
: 12.5in x 20.0inroyal-quarto
: 10.0in x 12.5inroyal-octavo
: 6.25in x 10.0incrown-folio
: 10.0in x 15.0incrown-quarto
: 7.5in x 10.0incrown-octavo
: 5.0in x 7.5infoolscap-folio
: 8.5in x 13.5infoolscap-quarto
: 6.75in x 8.5infoolscap-octavo
: 4.25in x 6.75inmedium-quarto
: 9.0in x 11.5indemy-quarto
: 8.75in x 11.25indemy-octavo
: 5.625in x 8.75in Basically the current standard W3C set, but also some more: a0
through a7
and a10
, whereas no JIS variants.
pre-defined page sizes:
A3
,A4
,A5
,B4
,B5
,JIS-B4
,JIS-B5
,letter
,legal
, orledger
.New sizes are added with an environment variable, e.g. set
bfo-sys-page-size-a6
to105mm 148mm
Only standard size keywords.
Invoice
: 5.5in x 8inExecutive
: 7.25in x 10.5inBroadsheet
: 17in x 22in
This is a consolidated and updated revision of #328 from mid-2016. When @fantasai closed that issue by editor discretion, she said:
I shall show that there is specific demand for certain keywords, in the fist section below.
Moreover, although not recorded explicitly and lacking a WG decision, there appears to have been somewhat of a consensus back then that keywords should be added to CSS for
commonly used sizes with
standardized identifiers and
hard to remember dimensions.
I shall document those as well, in the second section below.
Interoperability for International Sheet and Envelope Sizes
TL;DR: Add all missing keywords for standard paper sizes in the ISO 216 A and B series, the ISO 269 C series and the JIS P 0138 B series:
A0
,A1
,A2
andA6
,A7
,A8
,A9
,A10
B0
,B1
,B2
,B3
andB6
,B7
,B8
,B9
,B10
JIS-B0
,JIS-B1
,JIS-B2
,JIS-B3
andJIS-B6
,JIS-B7
,JIS-B8
,JIS-B9
,JIS-B10
C0
,C1
,C2
,C3
,C4
,C5
,C6
,C7
,C8
,C9
,C10
While web browser developers may seem less than keen to invest more resources in css-page than absolutely necessary, there are several applications specializing in CSS-driven PDF creation which strongly rely on this particular Module and may wish to extend its capabilities. The W3C should care about harmonizing their use of CSS to ease interchange and thereby making manuscripts more universal.
WeasyPrint and Vivliostyle support all currently standardized keywords for
size
(orpage-size
in the future) standardized by CSS in level 3:A3
,A4
,A5
,B4
,B5
,JIS-B4
,JIS-B5
(and AmericanLetter
,Legal
,Ledger
). Their open source code shows that it would be ridiculously simple to add more named sizes. wkhtmltopdf uses plain headless Qt Webkit and relies on its capabilities. Addendum: paged.js seems to add all of the A series (although A8 and A9 are undocumented).Existing implementations from PDF Reactor, Prince and Antenna House support more than those specified keywords, but they use partially incompatible custom keywords for the same physical sizes. In one case, there are three different custom keywords for the same size:
ANSI-C
,C
andBroadsheet
for17in 22in
. This hinders stylesheet interchange – avoiding this is prime motivation for standardization.However, at least two existing implementations agree on keywords and definitions of all ISO 216 formats. Since ISO paper sizes result from an irrational aspect ratio of √2:1 and an integer base area, A(A0) = 1 m², their odd edge lengths are hard to remember exactly. Their popularity, stability, ease of implementation and the difficulty of using their numeric values, makes them ideal candidates to add.
In the following table, the custom keywords already supported by implementations are highlighted if they are identical to the proposed keyword. In particular, the
ISO-
prefix supported by Antenna House in aliases shall not be adopted.A10
26mm 37mm
A10
C10
28mm 40mm
C10
B10
31mm 44mm
B10
A9
37mm 52mm
A9
C9
40mm 57mm
C9
B9
44mm 62mm
B9
A8
52mm 74mm
A8
C8
57mm 81mm
C8
B8
62mm 88mm
B8
A7
74mm 105mm
A7
C7
81mm 114mm
C7
B7
88mm 125mm
B7
A6
105mm 148mm
A6
A6
C6
114mm 162mm
C6
ISO-C6
B6
125mm 176mm
B6
ISO-B6
,B6
A5
148mm 210mm
A5
A5
A5
C5
162mm 229mm
C5
ISO-C5
B5
176mm 250mm
B5
B5
ISO-B5
,B5
A4
210mm 297mm
A4
A4
A4
C4
229mm 324mm
C4
ISO-C4
B4
250mm 353mm
B4
B4
ISO-B4
,B4
A3
297mm 420mm
A3
A3
A3
C3
324mm 458mm
C3
ISO-C3
B3
353mm 500mm
B3
A2
420mm 594mm
A2
C2
458mm 648mm
C2
B2
500mm 707mm
B2
A1
594mm 841mm
A1
C1
648mm 917mm
C1
B1
707mm 1000mm
B1
A0
841mm 1189mm
A0
C0
917mm 1297mm
C0
B0
1000mm 1414mm
B0
Usability for common, standardized, odd-valued Page Sizes
TL;DR: Optionally, add keywords for the standard paper sizes in ISO 217 (raw oversizes) and ISO 5457 (untrimmed drawing paper sizes).
If the interoperability argument in the first section above was not convincing enough to add keywords for the missing sizes from ISO 216 and all of ISO 269, they should also qualify due to having standardized identifiers and odd length values, and even if some were not commonly used, it would be beneficial to add the complete series nevertheless, for consistency, so authors do not have to remember which sizes do not have a keyword in CSS.
The international standard paper sizes – series
A
andB
defined in ISO 216 and seriesC
in ISO 269, which has been withdrawn in 2009 but still exists in local norms like DIN 476-2 – have been adopted by many national standardization bodies. Some have extended definitions for special purposes, e.g. theRA
andSRA
series from ISO 217, German2A0
from DIN 476 or the now-withdrawn SwedishD
–G
series from SIS 014711 and, of course, the JapaneseB
series from JIS P 0138 that is already recognized partially by CSS. For envelopes in particular, there are also some sizes with an 2:1 aspect ratio that combine the non-common edges of two adjacent sizes, e.g. C5/C4. The respective Wikipedia article for paper size is quite comprehensive.However, most of these sizes are of limited interest to most CSS authors, at least with consumer printers, but those who need any of them would certainly welcome their addition to the standard.
Since CSS introduced the
JIS-
prefix to distinguish Japanese B sizes from international ones defined by ISO, it is not surprising thatISO-
,US-
andANSI-
also appear as prefixes for short size codes in existing implementations.Proposed side rule:
I do not propose any of those local sizes here, although some are apparently used frequently.The only local sizes I am proposing are the rest of the JIS P 0138 series. Keywords for B4 and B5 are already specified and an analogous one for B6 is already supported in at least one implementation.JIS-B12
16mm 22mm
JIS-B11
22mm 32mm
JIS-B10
32mm 45mm
JIS-B9
45mm 64mm
JIS-B8
64mm 91mm
JIS-B7
91mm 128mm
JIS-B6
128mm 182mm
JIS-B6
JIS-B5
182mm 257mm
JIS-B5
JIS-B5
JIS-B4
257mm 364mm
JIS-B4
JIS-B4
JIS-B3
364mm 515mm
JIS-B2
515mm 728mm
JIS-B1
728mm 1030mm
JIS-B0
1030mm 1456mm
Furthermore, I propose to add all sizes from two international standards, which are not covered by the interoperability argument (as of early 2020).
ISO 217 specifies two A-based series for raw, uncut, untrimmed sheets, adding an
R
(for primary range) andSR
(supplementary range) prefix, respectively. PDF Reactor does support systematic keywords for all of them. The actual standard seems to only require the recognition of (S)RA0, (S)RA1 and (S)RA2, but othe oversizes to the sizes of the ISO 216 A series are encountered in practice. I think it makes sense to support at least as many sizes as the following standard for drawing paper.ISO 5457 specifies drawing paper sizes, where the trimmed sizes with a
T
suffix are identical to the respectiveA
series sizes, whereas the sides of untrimmedU
sizes are 3 to 4 centimeters larger. The standard also specifies a fixed area for the drawing space resulting from20mm
and30mm
page margins, but does not assign monikers.SRA0
900mm 1280mm
SRA0
A0U
880mm 1230mm
RA0
860mm 1220mm
RA0
SRA1
640mm 900mm
SRA1
A1U
625mm 880mm
RA1
610mm 860mm
RA1
SRA2
450mm 900mm
SRA2
A2U
450mm 625mm
RA2
430mm 610mm
RA2
A3U
330mm 450mm
SRA3
)320mm 450mm
SRA3
RA3
)305mm 430mm
RA3
A4U
240mm 330mm
SRA4
)225mm 320mm
SRA4
RA4
)215mm 305mm
RA4
160mm 225mm
SRA5
152mm 215mm
RA5
112mm 160mm
SRA6
107mm 152mm
RA6
80mm 112mm
SRA7
76mm 107mm
RA7
56mm 80mm
SRA8
53mm 76mm
RA8
All American sizes, which have not already been specified in CSS, fail at least one of the three stated criteria, because their edges measure a simple number of half inches and are even often known only by those numbers (which are generally assumed to be exact).
The only popular metric sizes that are known by integer numbers are photographic prints (i.e. traditionally 9×13, 10×15, 13×18, 20×30), which, apparently, are rather approximate in fact, because they are really based on rounded inch-based specifications in ISO 1008 (see Wikipedia).