So I have a thermal printer (Kube II) and i'm trying to print a code128 barcode to it. The barcode I generate is too wide to fit on the receipt paper.
code128 = new Code128();
code128.setData(Encoded);
code128.setLineWidth(1);
code128.setHeight(25);
code128.generateBarcode();
I have tried shrinking it but the quality gets to the point where it cant be scanned any longer. I used Thumbnails to shrink it.
BufferedImage originalImage = ImageIO.read(new File("test.png"));
BufferedImage newImage = Thumbnails.of(originalImage).size(190, 25).asBufferedImage();
Does anyone have any idea as to how I can print the barcode to the printer and retain quality?