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

Free Support Forum - aspose.com

BarCode shows fuzzy

I am using Aspose BarCode to generate a bar code to insert into a aspose.pdf document.
With the following code.

            barCodeGenerator.CodeText = barcodetext;
	barCodeGenerator.Save(imgStream, BarCodeImageFormat.Png);
	PDFPage.AddImage(imgStream, pageLocation, 350, 55, false);

where pageLocation is a rectangle on a pdf page.
Specifying width and height of image to be 350, 55 accordingly.

I saved down the imgStream and confirmed that the image exists ( I am attaching a persisted image file)
However after Image was added to the pdf document
I am seeing very fuzzy image … instead of a crisp and clean barcode

What am I doing wrong ?testbarcode.png (186 Bytes)pdf.jpg (14.3 KB)


Thanks for the sample images and details.

After simple checking your case, I found your issue is more related to Aspose.PDF API as the rendered image looks to me ok (regarding quality) by Aspose.BarCode. I am moving this thread to Aspose.PDF forums, so one of our fellow colleagues from Aspose.PDF team could evaluate your issue thoroughly and assist you better.