1

The following prints my barcode (using barbecue)

try{
    Barcode b = BarcodeFactory.createCode128(info);

    PrinterJob job = PrinterJob.getPrinterJob();
    job.setPrintable(b);
    if (job.printDialog()){}
        job.print();
    }
}catch (Exception e){
        e.printStackTrace();
} 

I want now to set the location in the printed area.. I tried the following with different numbers but the output is the same.

Point p = new Point(10, 10); 
b.setLocation(p); 

What am I missing?

yaylitzis
  • 5,354
  • 17
  • 62
  • 107

0 Answers0