Free Support Forum - aspose.com

InsertBarcodeToPDF --

On the wiki doc to aspose.barcode there is a reference to insertbarcodetopdf - Can advise on the best aproach and some code examples. I've tried using pdf.kit to add a watermark, but that seems to be scalling the image.

I have survey forms that need to be filled out by unique users and scanned in when complete. I want to attach a barcode to each survey form so that we can automate the survey results database update.

It's not related to pdf.kit as I thought in my earlier post. The problem is that the barcode image thats produced is too large. I need a way to control the barcode output size. Can you provide an example on how to do this? I tried some of approaches from another post (How do you resize barcode image when saving to a file?) in this forum, but they didn't work.

thanks rob

Dear rob,

Thanks for your post.

Try to reduce the resolution.DpiX and resolution.DpiY, before inserting the image into the pdf.

barCodeControl1.Resoultion.DpiX = 96f;
barCodeControl1.Resoultion.DpiY = 96f;

thanks that seems to work.