title: How to Print a bill in the printer with an image as logo, java
body: <p>what I want to do is to print a bill with a logo on the top left</p>
  
  <p>I can print the image like this:</p>
  
  <pre><code>public class PrintLogo {
  
      public static void main(String args[]) throws Exception {
  
          PrintRequestAttributeSet pras = new HashPrintRequestAttributeSet();
          pras.add(new Copies(0));
  
  
          PrintService pss = PrintServiceLookup.lookupDefaultPrintService();
  
          System.out.println("Printing to " + pss);
  
          DocPrintJob job = pss.createPrintJob();
  
          FileInputStream fin = new FileInputStream("D:\\logo.gif");
          Doc doc = new SimpleDoc(fin, DocFlavor.INPUT_STREAM.GIF, null);
  
          job.print(doc, pras);
  
          fin.close();
      }
  }
  </code></pre>
  
  <p><br></p>
  
  <p>and to print the bill I'm using the "PrinterJob" <br></p>
  
  <p>I couldn't find a way to print the bill with the logo</p>
  
  <p>so any help please :)</p>