[JAVA2D] Querying paper sizes for a printer

2008-07-03 Thread ssinai
Given a print service from something like PrintService defaultPrintService = PrintServiceLookup.lookupDefaultPrintService() is there a way to query the default print service to get the paper sizes that print service (printer) can handle? For example, I'd like to get a list back containing

Re: [JAVA2D] Querying paper sizes for a printer

2008-07-03 Thread Phil Race
You almost had it. For some reason you aren't properly using the answer (Object [] res) you got from the service, so you are only seeing the first of the list. And I'm not sure where you got MediaRequested from, that should not compile as there's no such class. That should be Media[] res =

Re: [JAVA2D] Querying paper sizes for a printer

2008-07-03 Thread ssinai
Thanks Phil. Now it's working. (I stumbled upon a way to make this work about a year ago, but for some reason, I couldn't remember how to do it. Probably age.) BTW - The MediaRequested reference was caused by me doing a little editing in the original post, without compiling. I was starting