Since this question is 10 months old, I'm guessing you either found an answer somewhere else or gave up.
Anyway, from what I understand you would have to do something like this:
PrintJob job = new PrintJob.Builder(in).jobName("PrintLabel").userName ("anonymous").copies(1).build();
HashMap<String, String> printJobAttributes = new HashMap<String, String>();
printJobAttributes.put("job-attributes", "media:keyword:????_80x50mm");
job.setAttributes(printJobAttributes );
I'm actually trying to figure the same thing out right now. I'm stuck at what to use where the question marks are, and I'm not sure "media" is the right attribute to use. If you were able to find another more complete answer let us know! :)