Hello,
I'm working on a swing/awt application that generates code128 type barcodes on the specific criterion(business requirement). Now application is functional upto barcode creation but its unable to print that barcode on printer properly. I'm using TSC TTP244 Pro label printer.
Label size is 2.25''x1.25''. Printer prints barcode on label by skipping 4 labels.
Can any body figure out the problem and tell a solution how can I set printing without skipping any label??
Here is my code I'm using for printing.

PrinterJob pj = PrinterJob.getPrinterJob();
if (pj.printDialog()) {
// PageFormat pf = pj.defaultPage();
PageFormat pf = pj.defaultPage();

Paper paper = pf.getPaper();

double width =16.0* 72;
double height = 10 * 72;
double margin = 36 * 72;

paper.setSize(width, height);
paper.setImageableArea(
margin,
margin,
width - (margin * 2),
height - (margin * 2));

pf.setPaper(paper);




try {
pj.setPrintable(new fbc_Main(), pf);
pj.print();


//initialize();

} catch (PrinterException ex) {
ex.printStackTrace();
} catch (ClassNotFoundException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
} catch (SQLException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}