Hi I am working on generating pdf417 barcode. For this I followed this link.
try {
String a = "Microsoft";
String b = "wkejew";
PDF417 barcode = new PDF417();
barcode.setData(a+b);
// barcode.setData(a);
ServletOutputStream servletoutputstream = response.getOutputStream();
response.setContentType("image/gif");
response.setHeader("Pragma", "no-cache");
response.setHeader("Cache-Control", "no-cache");
response.setDateHeader("Expires", 0);
barcode.drawBarcode(servletoutputstream);
} catch (Exception e) {
throw new ServletException(e);
}
so now problem is the barcode I am getting is having much width. So can I decrease the width?
From your link:
How to Set Generated Barcode PDF-417 Image Width and Height?Top
You can set barcode image width and height through properties barcodeWidth and barcodeHeight values.
Or you can set X (bar module width) and Y (bar module height) values
来源:https://stackoverflow.com/questions/28607547/how-to-set-width-of-generated-pdf417-barcode-using-java