Java examples for 2D Graphics:Print
Determining the Capabilities of a Print Service
import javax.print.PrintService; import javax.print.attribute.Attribute; public class Main { public static void main(String[] args) { PrintService service = null;// w w w.ja v a 2s . c o m Attribute[] attrs = service.getAttributes().toArray(); for (int j=0; j<attrs.length; j++) { String attrName = attrs[j].getName(); // Retrieve the string version of the attribute value String attrValue = attrs[j].toString(); //process(service, attrName, attrValue); } } }