Linear Barcode (Code 93) Consitency

Am I able to specify the height and width of the image created when using this as an API? Is there documentation of how to specify barcode generation parameters when using this as an API?

I am having consistency issues with generating linear barcodes (Code 93)… the value being placed in the barcode seems to have an impact on the print quality of the image when embedded in a pdf. The image file itself is 32 bit, and all are the same dpi, height and width, but some print nice and clean, others print pixelated and are not readable by the barcode scanner…

Hi Joe,

Thank you for contacting support. Aspose.BarCode provides control over the barcode image size. Please refer to this helping topic: Generate Barcode Using Custom Width Support

The getOnlyBarCodeImage method will allow you to get the exact bar code in the form of buffered image and then the getCustomSizeBarCodeImage method will allow you to set the size of the whole picture with bar code inside. Please don't truncate its original width or height otherwise you could face recognition failure problems.

However, regarding consistency issues of Code93, did you try using the latest version of Aspose.BarCode for Java 6.0.0? If not, then please try and let us know your findings. In case, you are already using the latest version, then please provide us the complete code snippets to replicate the problem of pixelated prints. Please provide code snippet for both scenarios. It will help us to be more specific.

Please feel free to reply us in case of any confusion or questions.

Thank you for your reply!

I just downloaded the most recent version (6.0.0)… are you stating that I should not be resizing the image when it is placed into the browser/pdf? For example, the image generated from the api has a height of 100 pixels, but in the HTML/CSS I resize to 70px height… I am not specifying the width so it will automatically be proportioned to the height respectively… I will need for the image/barcode to be scalable in order to fit onto the label I’m generating along with all the other content being placed onto the label. When I specify the height of the Aztec and DataMatrix barcodes on the same label, using the same method they do not distort…

I will try the most recent version and modify the resizing and let you know my findings.

Thank you! :slight_smile:

- Joe

Hi Joe,


Well, please note that Aspose.BarCode API does not support PDF or HTML file formats. Aspose.Pdf and Aspose.Words are the separate APIs to handle PDF and HTML file formats respectively. My point is, you can generate barcode images using Aspose.BarCode API. You can also adjust the size while generating a barcode image. Did you notice the distortion issue before placing barcode images to the PDF or HTML formats?
Joe:
I will need for the image/barcode to be scalable in order to fit onto the label I’m generating along with all the other content being placed onto the label.
We’re not certain about, how you are placing and scaling barcode images. It will be so nice of you if you can please provide us a complete source code and source HTML/PDF documents. Also, please highlight the distortion issue through a screenshot. We’ll look into the matter and guide you accordingly.