Free Support Forum - aspose.com

Create a Barcode with specific parameters

Hi all,


I need to create an interleaved 2 of 5 barcode with the following specifications:

1. Interleaved2of5 – Ariel Font<o:p></o:p>

2. Height of barcode 0.40 cm

3. Total length to be maximum 9cm

4. Bars between a 3 & 7 in dots

5. Spaces between a 4 & 7 in dots


Can all these setting be set within Aspose.Barcode. also the length of the data to be encoded is 44 digits.


Regards

Hi Eugene,


Thank you for contacting support. Well, you can generate the Interleaved2of5 code using the latest version of Aspose.BarCode for .NET 7.0.0 APIs. You can manage its font, size, bars spaces and encode 44 digits as well. Please refer to the following help topics: Generate Barcode Using Custom Width Support, Set Height of the Bars in the Barcode Image and Wide Narrow Ratio

We hope, this helps. Please let us know in case of any confusion or questions.

Note: Regarding the size of the barcode, GetOnlyBarCodeImage method will return you the minimum possible size and you can use GetCustomSizeBarCodeImage method to adjust its size. Please don’t truncate its original width or height otherwise you could face recognition failure problems.

Hi Imran,

So the barcode needs to be 0.4 cm high etc. how do we get the image to be high quality or high DPI for printing

Do we just increase the resolution through builder.Resolution = new Resolution(96f, 96f, ResolutionMode.Customized) for example from 96 to 300 or 600 for instance and will this still keep the height size if the image at 0.4cm.

Regards

Hi Eugene,


Thank you for the inquiry. The minimum size of the barcode also depends upon the code text which you are encoding. The GetOnlyBarCodeImage method returns the minimum size barcode and when we extend its size using GetCustomSizeBarCodeImage method, it auto sets its resolution. So we would suggest you to not set resolution in case you are using GetCustomSizeBarCodeImage method. If the GetOnlyBarCodeImage method does not return an image with minimum 0.4 cm height, then please provide us your sample code text and complete source code. We’ll check and reply you accordingly.

Regarding the image quality, please check this help topic: Image Formatting and Display Settings

We’re looking forward to help you.