Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

PrintRequestAttributeSet()  RSS feed

Ian Lockwood
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Using the new Java Print Service API now in Beta release you can specify atributes for your print job as follows
PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet();
aset.add(OrientationRequested.LANDSCAPE );
aset.add(new Copies(1));
aset.add(new JobName("Job Card No.", null));
What I want to be able to do is set all the margins for my A4 media to their minumum. Currently I can only do this in the rpint dialogue. What is the attribute name for margins? :-)
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!