We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Barcode Generation and Recognition from pdf

Hi ,

I was able to generate barcode onto the pdf file as well as recognize it but due to trial version i coudnt test it for pdf417 barcode type , only allowed type is for Code39Standard.

but there were few issues like fixing the size and width of the barcode . it wouldnt stick to the specified size and width .

it would if i specified the autowidth to false but the data got truncated and recognition fails .

Is their any way i can test it for pdf417 and also restrict the size of barcode before we decide to buy the product.

We have to generate a pdf417 barcode of some fixed size and width onto specified region in a pdf file and also read back the generated barcode from pdf file after it is scanned.

Any immediate help will be appreciated ..





Hi Nishank,

Thanks for considering Aspose.

Evaluation version can only recognize Code39 barcodes. For recognizing other supported barcodes, please visit http://www.aspose.com/corporate/purchase/temporary-license.aspx for a 30 days fully functional temporary license.

You can restrict the barcode size by setting BarCodeBuilder.AutoSize property to false and specifying other size related properties. For detailed information on this topic, please refer to http://www.aspose.com/documentation/.net-components/aspose.barcode-for-.net/print-barcode-of-exact-size-based-on-unit.html.

A sample program is also attached, that generates barcode and insert into a pdf document and then read back from it.

Hi saqib,

I was able to test with temporary licence for pdf417 but there were couple of issues

1 ] junk characteres were returned when reading from scanned pdf file
reading from original pdf file works.

2 ] Barcode rezising issues , I tried to restrict it with autosize but then barcode generated on pdf gets trimed and barcode reading fails .
i need the smallest specification of barcodes height and width for the max content that pdf417 can hold which is around 1850.

i have attached my sample web application along with the sanned and original pdf file , kindly let me know how to fix the issue


  1. I have sent the pdf document to the developers and they are looking into it. I have also logged it in our bug tracking system (ID: 11210). We will inform you when it gets fixed or there is a feedback.
  2. Please update the following properties in your sample code. It will relatively generate smaller barcode.

Keep the last 4 properties commented out.

b.xDimension = 0.1f;
b.yDimension = 0.8f;
b.CodeLocation = CodeLocation.None;
[//b.BarHeight](https://b.barheight/) = 70;
[//b.ImageWidth](https://b.imagewidth/) = 300;
[//b.GraphicsUnit](https://b.graphicsunit/) = System.Drawing.GraphicsUnit.Inch;
[//b.AutoSize](https://b.autosize/) = true ;

The issues you have found earlier (filed as 11210) have been fixed in this update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.