I’m having some trouble with generating a certain size UPC-A barcode. Using the code below, a UPC-A is generated that has the following issues:
1. The right-most digit is being cut-off. Shrinking the font should not be an option because then the numbers within the Barcode would not fill the space there. With AutoSize set to “true”, there is no reason the image size shouldn’t take the font properly into account (it is a purchased font but that should not matter).
2. The CodeTextSpace seems to have no effect on the spacing from the bottom of the barcode lines and the top of the code. It does for other barcode types. The affect for UPC-A makes the whitespace underneath the whole barcode larger, which makes the entire image taller.
BarCodeBuilder b = new BarCodeBuilder(“850006000029”);
b.AutoSize = true;
b.SymbologyType = Symbology.UPCA;
b.CodeTextFont = new Font(“OCR B Std”, 16.0f);
b.CodeTextSpace = 0.5f; // This appears to have no effect
b.GraphicsUnit = GraphicsUnit.Millimeter;
b.xDimension = 0.66f;
b.BarHeight = 45.70f;
b.Resolution = new Resolution(1200.0f, 1200.0f, ResolutionMode.Customized);
b.Save(“sample.png”, BarCodeImageFormat.Png);
Any help looking into these two issues would be greatly appreciated.
Hi,
Many thanks for contacting Aspose support. We are currently reviewing your issues and will write back to you soon with more updates.
Please be sure to let us know in case there is anything else we could do to help during the interim and we will be glad to assist you.
Hi Tony,
Thanks for the quick reply. This is with version 7.1.0, from the NuGet repo. I quickly put the sample code together to get the request to you ASAP, and didn’t tie the license file into the builder. Attached is the sample after applying the license. Same barcode, just without the evaluation mark.
I can’t put the font file publicly into this thread: it’s a commercial font file. I have sent the font file via e-mail to you. If you need it to go to another e-mail address, please let me know.
Hi Tony,
Hi Tony,
The issues you have found earlier (filed as BARCODENET-34228;BARCODENET-34227) have been fixed in Aspose.BarCode for .NET 7.2.0.
This message was posted using Notification2Forum from Downloads module by Aspose Notifier.