Merge from mainline
[official-gcc.git] / libjava / classpath / javax / print / attribute / standard / MediaSize.java
blob00bcb34954f0294978c2f2405d9d65d2c4335ccc
1 /* MediaSize.java --
2 Copyright (C) 2005 Free Software Foundation, Inc.
4 This file is part of GNU Classpath.
6 GNU Classpath is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
9 any later version.
11 GNU Classpath is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with GNU Classpath; see the file COPYING. If not, write to the
18 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19 02110-1301 USA.
21 Linking this library statically or dynamically with other modules is
22 making a combined work based on this library. Thus, the terms and
23 conditions of the GNU General Public License cover the whole
24 combination.
26 As a special exception, the copyright holders of this library give you
27 permission to link this library with independent modules to produce an
28 executable, regardless of the license terms of these independent
29 modules, and to copy and distribute the resulting executable under
30 terms of your choice, provided that you also meet, for each linked
31 independent module, the terms and conditions of the license of that
32 module. An independent module is a module which is not derived from
33 or based on this library. If you modify this library, you may extend
34 this exception to your version of the library, but you are not
35 obligated to do so. If you do not wish to do so, delete this
36 exception statement from your version. */
39 package javax.print.attribute.standard;
41 import java.util.ArrayList;
43 import javax.print.attribute.Attribute;
44 import javax.print.attribute.Size2DSyntax;
46 /**
47 * The <code>MediaSize</code> printing attribute class specifies the size
48 * of a printing media. The size is defined in portrait orientation with
49 * x at the bottom edge and y at the left edge.
50 * <p>
51 * There are several media sizes predefined through the nested classes. Further
52 * sizes may be provided by the application. <code>MediaSize</code> is not used
53 * as a printing attribute currently. It may be used to get the actual sizes
54 * for a named media or to find a suitable <code>MediaSizeName</code> instance
55 * by querying with the needed sizes.
56 * </p>
57 * <p>
58 * <b>IPP Compatibility:</b> MediaSize is not an IPP 1.1 attribute.
59 * </p>
60 * @see javax.print.attribute.standard.MediaSizeName
62 * @author Michael Koch (konqueror@gmx.de)
63 * @author Wolfgang Baer (WBaer@gmx.de)
65 public class MediaSize extends Size2DSyntax
66 implements Attribute
68 private static final long serialVersionUID = -1967958664615414771L;
70 private static ArrayList mediaCache;
72 static
74 mediaCache = new ArrayList();
76 MediaSize tmp = MediaSize.ISO.A0;
77 tmp = MediaSize.JIS.B0;
78 tmp = MediaSize.Engineering.A;
79 tmp = MediaSize.NA.LEGAL;
80 tmp = MediaSize.Other.EXECUTIVE;
83 private MediaSizeName media;
85 /**
86 * Creates a <code>MediaSize</code> object.
88 * @param x the size in x direction
89 * @param y the size in y direction
90 * @param units the units to use for the sizes
92 * @exception IllegalArgumentException if x or y &lt; 0 or units &lt; 1
94 public MediaSize(float x, float y, int units)
96 super(x, y, units);
97 mediaCache.add(this);
101 * Creates a <code>MediaSize</code> object associated with the given
102 * media name.
104 * @param x the size in x direction
105 * @param y the size in y direction
106 * @param units the units to use for the sizes
107 * @param media the media name to associate
109 * @exception IllegalArgumentException if x or y &lt; 0 or units &lt; 1
111 public MediaSize(float x, float y, int units, MediaSizeName media)
113 super(x, y, units);
114 this.media = media;
115 mediaCache.add(this);
119 * Creates a <code>MediaSize</code> object.
121 * @param x the size in x direction
122 * @param y the size in y direction
123 * @param units the units to use for the sizes
125 * @exception IllegalArgumentException if x or y &lt; 0 or units &lt; 1
127 public MediaSize(int x, int y, int units)
129 super(x, y, units);
130 mediaCache.add(this);
134 * Creates a <code>MediaSize</code> object associated with the given
135 * media name.
137 * @param x the size in x direction
138 * @param y the size in y direction
139 * @param units the units to use for the sizes
140 * @param media the media name to associate
142 * @exception IllegalArgumentException if x or y &lt; 0 or units &lt; 1
144 public MediaSize(int x, int y, int units, MediaSizeName media)
146 super(x, y, units);
147 this.media = media;
148 mediaCache.add(this);
152 * Returns category of this class.
154 * @return The class <code>MediaSize</code> itself.
156 public Class getCategory()
158 return MediaSize.class;
162 * Searches for a MediaSize object with the given dimensions.
163 * If none is found with exact dimensions, the closest match is used.
164 * Afterwards the MediaSizeName of the found MediaSize object is
165 * returned - which might be null if none is specified.
167 * @param x the dimension for x
168 * @param y the dimension for y
169 * @param units the units to be used for comparison
170 * @return the corresponding MediaSizeName object, or null
172 public static MediaSizeName findMedia(float x, float y, int units)
174 if (x <= 0.0f || y <= 0.0f)
175 throw new IllegalArgumentException(
176 "x and/or y may not be less or equal 0");
178 if (units < 1)
179 throw new IllegalArgumentException("units may not be less then 1");
181 MediaSize bestMatch = null;
182 int bestDistance = Integer.MAX_VALUE;
184 int xMicro = (int) x * units;
185 int yMicro = (int) y * units;
187 for (int i = 0; i < mediaCache.size(); i++)
189 MediaSize size = (MediaSize) mediaCache.get(i);
190 int dist = (Math.abs(size.getXMicrometers() - xMicro)
191 + Math.abs(size.getYMicrometers() - yMicro));
193 if (dist < bestDistance)
195 bestMatch = size;
196 bestDistance = dist;
200 return bestMatch.getMediaSizeName();
204 * Returns the associated <code>MediaSize</code> instance for the
205 * given named media <code>MediaSizeName</code> instance.
207 * @param media the named media to search for.
208 * @return The corresponding <code>MediaSize</code> instance or
209 * <code>null</code> if none found.
211 public static MediaSize getMediaSizeForName(MediaSizeName media)
213 for (int i = 0; i < mediaCache.size(); i++)
215 MediaSize size = (MediaSize) mediaCache.get(i);
217 if (size.getMediaSizeName().equals(media))
218 return size;
221 return null;
225 * Tests if the given object is equal to this object.
227 * @param obj the object to test
229 * @return <code>true</code> if both objects are equal,
230 * <code>false</code> otherwise.
232 public boolean equals(Object obj)
234 if (!(obj instanceof MediaSize))
235 return false;
237 MediaSize tmp = (MediaSize) obj;
238 return (tmp.getXMicrometers() == this.getXMicrometers()
239 && tmp.getYMicrometers() == this.getYMicrometers());
243 * Returns the media name of this size.
245 * @return The media name.
247 public MediaSizeName getMediaSizeName()
249 return media;
253 * Returns the name of this attribute.
255 * @return The name "media-size".
257 public String getName()
259 return "media-size";
263 * Container class for predefined ISO media sizes.
265 * @author Sven de Marothy (sven@physto.se)
267 public static final class ISO
271 * ISO A0 paper, 841 mm x 1189 mm.
273 public static final MediaSize A0 = new MediaSize(841, 1189,
274 MediaSize.MM,
275 MediaSizeName.ISO_A0);
278 * ISO A1 paper, 594 mm x 841 mm
280 public static final MediaSize A1 = new MediaSize(594, 841, MediaSize.MM,
281 MediaSizeName.ISO_A1);
284 * ISO A2 paper, 420 mm x 594 mm
286 public static final MediaSize A2 = new MediaSize(420, 594, MediaSize.MM, MediaSizeName.ISO_A2);
289 * ISO A3 paper, 297 mm x 420 mm
291 public static final MediaSize A3 = new MediaSize(297, 420, MediaSize.MM, MediaSizeName.ISO_A3);
294 * ISO A4 paper, 210 mm x 297 mm
296 public static final MediaSize A4 = new MediaSize(210, 297, MediaSize.MM, MediaSizeName.ISO_A4);
299 * ISO A5 paper, 148 mm x 210 mm
301 public static final MediaSize A5 = new MediaSize(148, 210, MediaSize.MM, MediaSizeName.ISO_A5);
304 * ISO A6 paper, 105 mm x 148 mm
306 public static final MediaSize A6 = new MediaSize(105, 148, MediaSize.MM, MediaSizeName.ISO_A6);
309 * ISO A7 paper, 74 mm x 105 mm
311 public static final MediaSize A7 = new MediaSize(74, 105, MediaSize.MM, MediaSizeName.ISO_A7);
314 * ISO A8 paper, 52 mm x 74 mm
316 public static final MediaSize A8 = new MediaSize(52, 74, MediaSize.MM, MediaSizeName.ISO_A8);
319 * ISO A9 paper, 37 mm x 52 mm
321 public static final MediaSize A9 = new MediaSize(37, 52, MediaSize.MM, MediaSizeName.ISO_A9);
324 * ISO A10 paper, 26 mm x 37 mm
326 public static final MediaSize A10 = new MediaSize(26, 37, MediaSize.MM, MediaSizeName.ISO_A10);
330 * ISO B0 paper, 1000 mm x 1414 mm
332 public static final MediaSize B0 = new MediaSize(1000, 1414, MediaSize.MM, MediaSizeName.ISO_B0);
335 * ISO B1 paper, 707 mm x 1000 mm
337 public static final MediaSize B1 = new MediaSize(707, 1000, MediaSize.MM, MediaSizeName.ISO_B1);
340 * ISO B2 paper, 500 mm x 707 mm
342 public static final MediaSize B2 = new MediaSize(500, 707, MediaSize.MM, MediaSizeName.ISO_B2);
345 * ISO B3 paper, 353 mm x 500 mm
347 public static final MediaSize B3 = new MediaSize(353, 500, MediaSize.MM, MediaSizeName.ISO_B3);
350 * ISO B4 paper, 250 mm x 353 mm
352 public static final MediaSize B4 = new MediaSize(250, 353, MediaSize.MM, MediaSizeName.ISO_B4);
355 * ISO B5 paper, 176 mm x 250 mm
357 public static final MediaSize B5 = new MediaSize(176, 250, MediaSize.MM, MediaSizeName.ISO_B5);
360 * ISO B6 paper, 125 mm x 176 mm
362 public static final MediaSize B6 = new MediaSize(125, 176, MediaSize.MM, MediaSizeName.ISO_B6);
365 * ISO B7 paper, 88 mm x 125 mm
367 public static final MediaSize B7 = new MediaSize(88, 125, MediaSize.MM, MediaSizeName.ISO_B7);
370 * ISO B8 paper, 62 mm x 88 mm
372 public static final MediaSize B8 = new MediaSize(62, 88, MediaSize.MM, MediaSizeName.ISO_B8);
375 * ISO B9 paper, 44 mm x 62 mm
377 public static final MediaSize B9 = new MediaSize(44, 62, MediaSize.MM, MediaSizeName.ISO_B9);
380 * ISO B10 paper, 31 mm x 44 mm
382 public static final MediaSize B10 = new MediaSize(31, 44, MediaSize.MM, MediaSizeName.ISO_B10);
385 * ISO C3 envelope, 324 mm x 458 mm
387 public static final MediaSize C3 = new MediaSize(324, 458, MediaSize.MM, MediaSizeName.ISO_C3);
390 * ISO C4 envelope, 229 mm x 324 mm
392 public static final MediaSize C4 = new MediaSize(229, 324, MediaSize.MM, MediaSizeName.ISO_C4);
395 * ISO C5 envelope, 162 mm x 229 mm
397 public static final MediaSize C5 = new MediaSize(162, 229, MediaSize.MM, MediaSizeName.ISO_C5);
400 * ISO C6 envelope, 114 mm x 162 mm
402 public static final MediaSize C6 = new MediaSize(114, 162, MediaSize.MM, MediaSizeName.ISO_C6);
405 * ISO ISO Designated Long paper, 324 mm x 458 mm
407 public static final MediaSize DESIGNATED_LONG =
408 new MediaSize(324, 458, MediaSize.MM, MediaSizeName.ISO_DESIGNATED_LONG);
412 * Container class for predefined North American media sizes.
414 * @author Sven de Marothy (sven@physto.se)
416 public static final class NA
419 * US Legal paper size, 8.5 inch x 14 inch
421 public static final MediaSize LEGAL = new MediaSize(8.5f, 14f, MediaSize.INCH,
422 MediaSizeName.NA_LEGAL);
425 * US Letter paper size, 8.5 inch x 11 inch
427 public static final MediaSize LETTER = new MediaSize(8.5f, 11f, MediaSize.INCH,
428 MediaSizeName.NA_LETTER);
431 * 5 inch x 7 inch paper size.
433 public static final MediaSize NA_5X7 = new MediaSize(5, 7, MediaSize.INCH,
434 MediaSizeName.NA_5X7);
437 * 8 inch x 10 inch paper size.
439 public static final MediaSize NA_8X10 = new MediaSize(8, 10, MediaSize.INCH,
440 MediaSizeName.NA_8X10);
443 * 6 inch x 9 inch envelope size.
445 public static final MediaSize NA_6X9_ENVELOPE = new MediaSize(6f, 9f,
446 MediaSize.INCH,
447 MediaSizeName.NA_6X9_ENVELOPE);
450 * 7 inch x 9 inch envelope size.
452 public static final MediaSize NA_7X9_ENVELOPE = new MediaSize(7f, 9f,
453 MediaSize.INCH,
454 MediaSizeName.NA_7X9_ENVELOPE);
457 * 9 inch x 11 inch envelope size.
459 public static final MediaSize NA_9x11_ENVELOPE = new MediaSize(9f, 11f,
460 MediaSize.INCH,
461 MediaSizeName.NA_9X11_ENVELOPE);
464 * 9 inch x 12 inch envelope size.
466 public static final MediaSize NA_9x12_ENVELOPE = new MediaSize(9f, 12f,
467 MediaSize.INCH,
468 MediaSizeName.NA_9X12_ENVELOPE);
472 * 10 inch x 13 inch envelope size.
474 public static final MediaSize NA_10x13_ENVELOPE = new MediaSize(10f, 13f,
475 MediaSize.INCH,
476 MediaSizeName.NA_10X13_ENVELOPE);
479 * 10 inch x 14 inch envelope size.
481 public static final MediaSize NA_10x14_ENVELOPE = new MediaSize(10f, 14f,
482 MediaSize.INCH,
483 MediaSizeName.NA_10X14_ENVELOPE);
486 * 10 inch x 15 inch envelope size.
488 public static final MediaSize NA_10X15_ENVELOPE = new MediaSize(10f, 15f,
489 MediaSize.INCH,
490 MediaSizeName.NA_10X15_ENVELOPE);
493 * Number 9 envelope size. 4.5 inch x 10.375 inch
495 public static final MediaSize NA_NUMBER_9_ENVELOPE = new MediaSize(3.875f, 8.875f,
496 MediaSize.INCH,
497 MediaSizeName.NA_NUMBER_9_ENVELOPE);
500 * Number 10 envelope size. 4.125 inch x 9.5 inch
502 public static final MediaSize NA_NUMBER_10_ENVELOPE =
503 new MediaSize(4.125f, 9.5f, MediaSize.INCH, MediaSizeName.NA_NUMBER_10_ENVELOPE);
506 * Number 11 envelope size. 4.5 inch x 10.375 inch
508 public static final MediaSize NA_NUMBER_11_ENVELOPE = new MediaSize(4.5f, 10.375f, MediaSize.INCH,
509 MediaSizeName.NA_NUMBER_11_ENVELOPE);
512 * Number 12 envelope size. 4.75 inch x 11 inch
514 public static final MediaSize NA_NUMBER_12_ENVELOPE = new MediaSize(4.75f, 11f,
515 MediaSize.INCH,
516 MediaSizeName.NA_NUMBER_12_ENVELOPE);
519 * Number 14 envelope size. 5 inch x 11.5 inch
521 public static final MediaSize NA_NUMBER_14_ENVELOPE = new MediaSize(5f, 11.5f,
522 MediaSize.INCH,
523 MediaSizeName.NA_NUMBER_14_ENVELOPE);
527 * Container class for predefined US Engineering media sizes.
529 * @author Sven de Marothy (sven@physto.se)
531 public static final class Engineering
534 * ANSI A paper size. 8.5 inch x 11 inch
536 public static final MediaSize A = new MediaSize(8.5f, 11f,
537 MediaSize.INCH, MediaSizeName.A);
540 * ANSI B paper size. 11 inch x 17 inch
542 public static final MediaSize B = new MediaSize(11f, 17f,
543 MediaSize.INCH, MediaSizeName.B);
546 * ANSI C paper size. 17 inch x 22 inch
548 public static final MediaSize C = new MediaSize(17f, 22f,
549 MediaSize.INCH, MediaSizeName.C);
552 * ANSI D paper size. 22 inch x 34 inch
554 public static final MediaSize D = new MediaSize(22f, 34f,
555 MediaSize.INCH, MediaSizeName.D);
558 * ANSI E paper size. 33 inch x 44 inch
560 public static final MediaSize E = new MediaSize(34f, 44f,
561 MediaSize.INCH, MediaSizeName.E);
565 * Container class for predefined Japanese JIS media sizes.
567 * @author Sven de Marothy (sven@physto.se)
569 public static final class JIS
572 * JIS B0 paper. 1030 mm x 1456 mm
573 * Note: The JIS B-series is not identical to the ISO B-series.
575 public static final MediaSize B0 = new MediaSize(1030, 1456, MediaSize.MM, MediaSizeName.JIS_B0);
578 * JIS B1 paper. 1030 mm x 1456 mm
579 * Note: The JIS B-series is not identical to the ISO B-series.
581 public static final MediaSize B1 = new MediaSize(728, 1030, MediaSize.MM, MediaSizeName.JIS_B1);
584 * JIS B2 paper. 515 mm x 728 mm
585 * Note: The JIS B-series is not identical to the ISO B-series.
587 public static final MediaSize B2 = new MediaSize(515, 728, MediaSize.MM, MediaSizeName.JIS_B2);
590 * JIS B3 paper. 364 mm x 515 mm
591 * Note: The JIS B-series is not identical to the ISO B-series.
593 public static final MediaSize B3 = new MediaSize(364, 515, MediaSize.MM, MediaSizeName.JIS_B3);
596 * JIS B4 paper. 257 mm x 364 mm
597 * Note: The JIS B-series is not identical to the ISO B-series.
599 public static final MediaSize B4 = new MediaSize(257, 364, MediaSize.MM, MediaSizeName.JIS_B4);
602 * JIS B5 paper. 1030 mm x 1456 mm
603 * Note: The JIS B-series is not identical to the ISO B-series.
605 public static final MediaSize B5 = new MediaSize(182, 257, MediaSize.MM, MediaSizeName.JIS_B5);
608 * JIS B6 paper. 128 mm x 182 mm
609 * Note: The JIS B-series is not identical to the ISO B-series.
611 public static final MediaSize B6 = new MediaSize(128, 182, MediaSize.MM, MediaSizeName.JIS_B6);
614 * JIS B7 paper. 91 mm x 128 mm
615 * Note: The JIS B-series is not identical to the ISO B-series.
617 public static final MediaSize B7 = new MediaSize(91, 128, MediaSize.MM, MediaSizeName.JIS_B7);
620 * JIS B8 paper. 64 mm x 91 mm
621 * Note: The JIS B-series is not identical to the ISO B-series.
623 public static final MediaSize B8 = new MediaSize(64, 91, MediaSize.MM, MediaSizeName.JIS_B8);
626 * JIS B9 paper. 45 mm x 64 mm
627 * Note: The JIS B-series is not identical to the ISO B-series.
629 public static final MediaSize B9 = new MediaSize(45, 64, MediaSize.MM, MediaSizeName.JIS_B9);
632 * JIS B10 paper. 32 mm x 45 mm
633 * Note: The JIS B-series is not identical to the ISO B-series.
635 public static final MediaSize B10 = new MediaSize(32, 45, MediaSize.MM, MediaSizeName.JIS_B10);
638 * JIS chou #1 envelope size, 142 mm x 332 mm
640 public static final MediaSize CHOU_1 = new MediaSize(142, 332, MediaSize.MM);
643 * JIS chou #2 envelope size, 119 mm x 227 mm
645 public static final MediaSize CHOU_2 = new MediaSize(119, 227, MediaSize.MM);
648 * JIS chou #3 envelope size, 120 mm x 235 mm
650 public static final MediaSize CHOU_3 = new MediaSize(120, 235, MediaSize.MM);
653 * JIS chou #4 envelope size, 90 mm x 205 mm
655 public static final MediaSize CHOU_4 = new MediaSize(90, 205, MediaSize.MM);
658 * JIS chou #30 envelope size, 92 mm x 235 mm
660 public static final MediaSize CHOU_30 = new MediaSize(92, 235, MediaSize.MM);
663 * JIS chou #40 envelope size, 90 mm x 225 mm
665 public static final MediaSize CHOU_40 = new MediaSize(90, 225, MediaSize.MM);
668 * JIS kaku #0 envelope size, 287 mm x 382 mm
670 public static final MediaSize KAKU_0 = new MediaSize(287, 382, MediaSize.MM);
673 * JIS kaku #1 envelope size, 270 mm x 382 mm
675 public static final MediaSize KAKU_1 = new MediaSize(270, 382, MediaSize.MM);
678 * JIS kaku #2 envelope size, 240 mm x 332 mm
680 public static final MediaSize KAKU_2 = new MediaSize(240, 332, MediaSize.MM);
683 * JIS kaku #20 envelope size, 229 mm x 324 mm
685 public static final MediaSize KAKU_20 = new MediaSize(229, 324, MediaSize.MM);
688 * JIS kaku #3 envelope size, 216 mm x 227 mm
690 public static final MediaSize KAKU_3 = new MediaSize(216, 227, MediaSize.MM);
693 * JIS kaku #4 envelope size, 197 mm x 267 mm
695 public static final MediaSize KAKU_4 = new MediaSize(197, 267, MediaSize.MM);
698 * JIS kaku #5 envelope size, 190 mm x 240 mm
700 public static final MediaSize KAKU_5 = new MediaSize(190, 240, MediaSize.MM);
703 * JIS kaku #6 envelope size, 162 mm x 229 mm
705 public static final MediaSize KAKU_6 = new MediaSize(162, 229, MediaSize.MM);
708 * JIS kaku #7 envelope size, 142 mm x 205 mm
710 public static final MediaSize KAKU_7 = new MediaSize(142, 205, MediaSize.MM);
713 * JIS kaku #8 envelope size, 119 mm x 197 mm
715 public static final MediaSize KAKU_8 = new MediaSize(119, 197, MediaSize.MM);
718 * JIS kaku A4 envelope size, 228 mm x 312 mm
720 public static final MediaSize KAKU_A4 = new MediaSize(228, 312, MediaSize.MM);
723 * JIS you #1 envelope size, 120 mm x 176 mm
725 public static final MediaSize YOU_1 = new MediaSize(120, 176, MediaSize.MM);
728 * JIS you #2 envelope size, 114 mm x 162 mm
730 public static final MediaSize YOU_2 = new MediaSize(114, 162, MediaSize.MM);
733 * JIS you #3 envelope size, 98 mm x 148 mm
735 public static final MediaSize YOU_3 = new MediaSize(98, 148, MediaSize.MM);
738 * JIS you #4 envelope size, 105 mm x 235 mm
740 public static final MediaSize YOU_4 = new MediaSize(105, 235, MediaSize.MM);
743 * JIS you #5 envelope size, 95 mm x 217 mm
745 public static final MediaSize YOU_5 = new MediaSize(95, 217, MediaSize.MM);
748 * JIS you #6 envelope size, 98 mm x 190 mm
750 public static final MediaSize YOU_6 = new MediaSize(98, 190, MediaSize.MM);
753 * JIS you #7 envelope size, 92 mm x 165 mm
755 public static final MediaSize YOU_7 = new MediaSize(92, 165, MediaSize.MM);
759 * Container class for miscellaneous media sizes.
761 * @author Sven de Marothy (sven@physto.se)
763 public static final class Other
766 * US Executive paper size, 7.25 inch x 10.5 inch
768 public static final MediaSize EXECUTIVE = new MediaSize(7.25f, 10.5f,
769 MediaSize.INCH, MediaSizeName.EXECUTIVE);
772 * US Folio paper size, 8.5 inch x 13 inch
774 public static final MediaSize FOLIO = new MediaSize(8.5f, 13f, MediaSize.INCH, MediaSizeName.FOLIO);
777 * US Quarto paper size, 8.5 inches by 10.83 inches.
779 public static final MediaSize QUARTO = new MediaSize(8.5f, 10.83f, MediaSize.INCH,
780 MediaSizeName.QUARTO);
783 * US Invoice size, 5.5 inch x 8.5 inch
785 public static final MediaSize INVOICE = new MediaSize(5.5f, 8.5f,
786 MediaSize.INCH, MediaSizeName.INVOICE);
789 * US Ledger size, 11 inch x 17 inch
791 public static final MediaSize LEDGER = new MediaSize(11, 17, MediaSize.INCH,
792 MediaSizeName.LEDGER);
795 * Monarch (7 3/4) envelope size, 3.87 inch x 7.5 inch
797 public static final MediaSize MONARCH_ENVELOPE = new MediaSize(3.87f, 7.5f,
798 MediaSize.INCH,
799 MediaSizeName.MONARCH_ENVELOPE);
802 * Personal envelope size, 3.625 inch x 6.5 inch.
804 public static final MediaSize PERSONAL_ENVELOPE = new MediaSize(3.625f, 6.5f, MediaSize.INCH,
805 MediaSizeName.PERSONAL_ENVELOPE);
808 * Italian envelope size, 110 mm x 230 mm
810 public static final MediaSize ITALY_ENVELOPE = new MediaSize(110, 230,
811 MediaSize.MM,
812 MediaSizeName.ITALY_ENVELOPE);
815 * Japanese postcard, 100 mm x 148 mm
817 public static final MediaSize JAPANESE_POSTCARD = new MediaSize(100, 148, MediaSize.MM, MediaSizeName.JAPANESE_POSTCARD);
820 * Japanese double postcard, 148 mm x 200 mm
822 public static final MediaSize JAPANESE_DOUBLE_POSTCARD = new MediaSize(148, 200, MediaSize.MM, MediaSizeName.JAPANESE_DOUBLE_POSTCARD);