src/solaris/classes/sun/print/CUPSPrinter.java
Print this page
*** 138,147 ****
--- 138,150 ----
public CustomMediaSizeName[] getCustomMediaSizeNames() {
initMedia();
return cupsCustomMediaSNames;
}
+ public int getDefaultMediaIndex() {
+ return ((pageSizes.length >1) ? (int)(pageSizes[pageSizes.length -1]) : 0);
+ }
/**
* Returns array of MediaPrintableArea derived from PPD.
*/
public MediaPrintableArea[] getMediaPrintableArea() {
*** 199,210 ****
--- 202,220 ----
// add custom if no matching standard media
cupsMediaSNames[i] = msn;
// add this new custom msn to MediaSize array
if ((width > 0.0) && (length > 0.0)) {
+ try {
new MediaSize(width, length,
Size2DSyntax.INCH, msn);
+ } catch (IllegalArgumentException e) {
+ /* PDF printer in Linux for Ledger paper causes
+ "IllegalArgumentException: X dimension > Y dimension".
+ We rotate based on IPP spec. */
+ new MediaSize(length, width, Size2DSyntax.INCH, msn);
+ }
}
}
// add to list of custom MediaSizeName
// for internal use of IPPPrintService