Free Support Forum - aspose.com

2D Barcode in specific size

I would like to create a 2d (PDF417) barcode that prints out at 2.75 inches wide and .25 inches high, but is highly scannable. The text for the bar code is 156 characters long. Can someone help with the settings needed to create this? Thank you.

Hi,


Thank you for considering Aspose and Welcome to Aspose.BarCode forum.

I am assuming that you are using the .NET version of Aspose.BarCode. Below are some links for your reference.

Below linked article will guide you through the process of creating a PDF417 BarCode using the BarCodeBuilder class.
http://www.aspose.com/documentation/.net-components/aspose.barcode-for-.net/how-to-create-a-pdf417-barcode.html

The image size for the resultant BarCode depends upon a variety of factors. You can also check the following link for your reference.
http://www.aspose.com/documentation/.net-components/aspose.barcode-for-.net/adjusting-2d-images-size.html

As you have narrated that the CodeText for PDF417 BarCode will be 156 characters long, so the resultant BarCode will be vertically elongated. If you require to set the dimensions of the image as you have posted then you also need to set the X-Dimension and Y-Dimension accordingly to keep the resultant BarCode fairly scan-able. Please check below links,
http://www.aspose.com/documentation/.net-components/aspose.barcode-for-.net/manage-xdimension-and-ydimension.html
http://www.aspose.com/documentation/.net-components/aspose.barcode-for-.net/set-height-of-the-bars-in-the-barcode-image.html

Hope this helps. Please feel free to write back.