title: How to change font or size of text before printing using PrintService
body: <p>So the question is pretty straight forward. I have this method:</p>
  
  <pre><code>public void printString(String printerName, String text) {
  
  DocFlavor flavor = DocFlavor.BYTE_ARRAY.AUTOSENSE;
  PrintRequestAttributeSet pras = new HashPrintRequestAttributeSet();
  
  PrintService printService[] = PrintServiceLookup.lookupPrintServices(
          flavor, pras);
  PrintService service = findPrintService(printerName, printService);
  DocPrintJob job = service.createPrintJob();
  
  try {
      byte[] bytes;
      bytes = text.getBytes("CP437");
      Doc doc = new SimpleDoc(bytes, flavor, null);
      job.print(doc, null);
  } catch (Exception e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
  }
  }
  </code></pre>
  
  <p>and I want to change font and size of text before printing.
  I was playing around with PrintRequestAttributeSet but it doesn't seem like I can change the font or the size of text to be printed in this. Is it even possible to change font and size? I tried <a href="https://stackoverflow.com/questions/14352243/java-printing-font-stretch">Java Printing Font Stretch</a> but It doesn't seem to do anything when I set the resolution. What can I do about it? </p>
  
  <p>Additional info: I'm using RP58E POS Thermal printer</p>