InitializeMediaTable:
PROC [] ~ {
AddKnown:
PROC [k: Printing.KnownPaperSize, size: Printing.PaperDimensions] ~ {
key: ROPE ~ CreateAvailableKind[k];
paper: Printing.Paper ~ NEW [Printing.PaperObject ¬ [knownSize[k]]];
medium: Printing.Medium ~ NEW [Printing.MediumObject ¬ [paper[paper]]];
Insert[key, medium, size]
};
mediaTable ¬ RedBlackTree.Create[GetKey, Compare];
sizes are from Printing Protocol XSIS 118404
AddKnown[usLetter, [ 216, 279]];
AddKnown[usLegal, [ 216, 356]];
AddKnown[a0, [ 841, 1189]];
AddKnown[a1, [ 594, 841]];
AddKnown[a2, [ 420, 594]];
AddKnown[a3, [ 297, 420]];
AddKnown[a4, [ 210, 297]];
AddKnown[a5, [ 148, 210]];
AddKnown[a6, [ 105, 148]];
AddKnown[a7, [ 74, 105]];
AddKnown[a8, [ 52, 74]];
AddKnown[a9, [ 37, 52]];
AddKnown[a10, [ 26, 37]];
AddKnown[isoB0, [1000, 1414]];
AddKnown[isoB1, [ 707, 1000]];
AddKnown[isoB2, [ 500, 707]];
AddKnown[isoB3, [ 353, 500]];
AddKnown[isoB4, [ 250, 353]];
AddKnown[isoB5, [ 176, 250]];
AddKnown[isoB6, [ 125, 176]];
AddKnown[isoB7, [ 88, 125]];
AddKnown[isoB8, [ 62, 88]];
AddKnown[isoB9, [ 44, 62]];
AddKnown[isoB10, [ 31, 44]];
AddKnown[jisB0, [1030, 1456]];
AddKnown[jisB1, [ 728, 1030]];
AddKnown[jisB2, [ 515, 728]];
AddKnown[jisB3, [ 364, 515]];
AddKnown[jisB4, [ 257, 364]];
AddKnown[jisB5, [ 182, 257]];
AddKnown[jisB6, [ 128, 182]];
AddKnown[jisB7, [ 91, 128]];
AddKnown[jisB8, [ 64, 91]];
AddKnown[jisB9, [ 45, 64]];
AddKnown[jisB10, [ 32, 45]];
};