Location of barcode image

We are having difficulty finding the combination of the numbers in the mendor.addImage call that will insert a vertical barcode to the upper left margin of the pdf file attached (w9taxform.pdf). The java source code (with .txt extention) and the resulting pdf (w9taxform-vertical.pdf) using the following call are also attached.

mendor.addImage(inImgStream, pages, 0, 570, 70, 780);

The barcode shouldn't overlay any text, and it should leave some space at the top. Please advise what numbers to use in the addImage to achieve that.

Hi Joanna,

I have attached attached a sample output file. I have used the following statement to add this image.

mendor.addImage(inImgStream, pages, -100, 550, 70, 760);

Did you want to add the image like this on the PDF? Does that work for you?

Regards,

Thanks, this looks a lot better, can you make the top of the barcode top aligned with text "W-9", is there a way to specify the font size and style of the barcode, meaning how to make "123456789" a little smaller?

I have attached another image, can you please advise if we can use the same combination for this form assuming the barcode is also on the top left corner vertically, or the position are different for these 2 forms.

Thanks.

We use your combination in the program, barcode is not printed. Can you share your code how is being printed. Did you set the margin? Thanks.

Hi Joanna,

Please find attached the sample code which I used to add the barcode image in the PDF file.

Regarding your question about editing the barcode image, I’m afraid that this is not in the scope of Aspose.Pdf.Kit. Please post your question in the Aspose.BarCode forum, so that the related team would be able to help you out.

We’re sorry for the inconvenience,
Regards,

Hi Joanna,

We’re sorry for the inconvenience. Please find the sample code attached with this post.

Regards,


Hi Joanna,

I have logged the issue as PDFKITJAVA-11741 in our issue tracking system. Our team will look into the matter that why the starting position is not (0,0). This will help resolve your problem of placing the image correctly. However, in the meanwhile please use the workaround (sample) attached above.

We’re sorry for the inconvenience.
Regards,