This project has moved. For the latest updates, please go here.


Sep 19, 2014 at 7:28 PM
Edited Sep 19, 2014 at 8:08 PM
Under a certain size I am unable to set the dimensions of the barcode. The minimum I can get it down to is 3/4" by 2 3/26".

For example if I set Height to 150 and Width to 200 the actual bitmap size is Width = 328 and Height = 150.

If I deliberately leave the EncodingOptions null then the default sets them to 100 x 100 but that is not the aspect ratio that gets rendered.


Sep 25, 2014 at 6:37 PM
If you set the width and the height to 1 you will get an image which has the minimum resolution which is needed for the content.
So the minimum size depends on the barcode type, the size of the content, the error correction level.

Can you give a sample content and the type of barcode which you try to encode?
Sep 25, 2014 at 6:46 PM
The barcode type is PDF417. I'm assuming that for this type a certain aspect ratio needs to be preserved, which is why I wasn't seeing the results I had expected.

I do have it sorted now thanks.

Regarding the correct level, I did not see a way to set that. Have I missed something?


Sep 25, 2014 at 7:01 PM
Edited Sep 25, 2014 at 7:03 PM
Do you mean, how you can set the error correction level?
Here is a small snippet:
var writer = new BarcodeWriter
   Format = BarcodeFormat.PDF_417,
   Options = new PDF417EncodingOptions
      Height = 500,
      Width = 500,
      ErrorCorrection = PDF417ErrorCorrectionLevel.L5
var image = writer.Write("your content here");
Sep 25, 2014 at 7:02 PM
Great ... thanks!