On Wed, 5 May 2010 10:04:41 +0200 (MEST)
"Andreas Lehmkühler" <[email protected]> wrote:

Hi,

> To get the supported categories, try something like this:
> 
> PrintService printservice = PrintServiceLookup.lookupDefaultPrintService();
> Class[] categories = printservice.getSupportedAttributeCategories();
> for (int i=0;i<categories.length;i++)
>               
> System.out.println(categories[i].getName()+"="+lPrintservice.getDefaultAttributeValue(categories[i]));
> 

I checked the properties. It seems the printer doesn't suppor tray selection. 
Below is what i got:


javax.print.attribute.standard.JobName=Java Printing
javax.print.attribute.standard.RequestingUserName=oguz
javax.print.attribute.standard.Copies=1
javax.print.attribute.standard.Destination=file:/C:/Users/oguz/Documents/NetBeansProjects/trayprint/out.prn
javax.print.attribute.standard.OrientationRequested=portrait
javax.print.attribute.standard.PageRanges=1-2147483647
javax.print.attribute.standard.Media=iso-a4
javax.print.attribute.standard.MediaPrintableArea=(4.233,4.233)->(201.507,288.459)mm
javax.print.attribute.standard.Fidelity=false
javax.print.attribute.standard.SheetCollate=collated
sun.print.SunAlternateMedia=null
javax.print.attribute.standard.Chromaticity=color
javax.print.attribute.standard.Sides=one-sided
javax.print.attribute.standard.PrinterResolution=60000x60000 dphi

> To check if a particular attribute value is supported try something like this:
> 
> PrintService printservice = PrintServiceLookup.lookupDefaultPrintService();
> HashPrintRequestAttributeSet attributes = new HashPrintRequestAttributeSet(); 
> attributes.add(MediaTray.TOP);
> System.out.println(printservice.isAttributeValueSupported(MediaTray.BOTTOM, 
> DocFlavor.SERVICE_FORMATTED.PAGEABLE, attributes));

Setting the BOTTOM tray is not supported also. I read the technical 
specifications of the printer. It says auto tray selection is supported. What 
should i see to understand that tray selection is supported by the printer?

And can there be possibility that the PDFBOX is not supporting tray selection 
for that printer type? 

Thanx. 

-- 
Oguz Yarimtepe <[email protected]>

Reply via email to