title: Thermal receipt printer problems with auto cut
body: <p>I'm havin a bit of problem with printing a string through the thermal printer...</p>
  
  <p>It's printing properly the content of the string but it isn't auto cutting the paper, it's kept in the printer and not putting it out of it either.</p>
  
  <p>--CODE--</p>
  
  <pre><code>receipt = "Table #"+rs.getInt("table_id")+"\n\n"
                     + "Food\t\tAdd\t\tRemove\n\n";
  
  String defaultPrinter = PrintServiceLookup.lookupDefaultPrintService().getName();
  System.out.println("Default printer: " + defaultPrinter);
  PrintService service = PrintServiceLookup.lookupDefaultPrintService();
  
  InputStream is = new ByteArrayInputStream(receipt.getBytes("UTF8"));
  
  DocFlavor flavor = DocFlavor.INPUT_STREAM.AUTOSENSE;
  Doc doc = new SimpleDoc(is, flavor, null);
  DocPrintJob job = service.createPrintJob();
  PrinterJob printJob = PrinterJob.getPrinterJob();
  
  
  job.print(doc, null);
  is.close(); 
  </code></pre>
  
  <p>any ideas?</p>