Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am new to using Java's print service and from reading articles I see that you need the the right DocFlavor to print properly.

Question: What DocFlavor to use for printing the receipt in a POS thermal printer?

share|improve this question

I've had success with DocFlavor.BYTE_ARRAY.AUTOSENSE printing to Zebra and Datamax printers. This is when the printer is being driven by commands sent directly (as byte arrays) by the program with the built-in printer language (EPL, DPL, ZPL): select this font, print this string here, etc.

In addition to AUTOSENSE there are some other options for image and text formats. I would guess these depend on the drivers to support them correctly. You send the bytes for an image or text, and the driver does the work of converting that to something the printer understands. So you lose a bit (or a lot) of control, but let the driver to the work. That's the usual trade-off.

share|improve this answer
Thx ill try this and post the results – user1019599 Sep 13 '12 at 12:44

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.