I am stamping multiple images in the PDF document being generated from my SharePoint app. The PDF generation & image is stamping is working fine, but the image is changing it's original width & height i.e. the image is getting stretched when added to the PDF.
Here is my code:
SPFile PendingimgFile = obj_sign.GetFile("PendingApproval");//Get Image
byte[] imgByte = PendingimgFile.OpenBinary(SPOpenBinaryOptions.None);
MemoryStream ms_img = new MemoryStream(imgByte);
iTextSharp.text.Image image = iTextSharp.text.Image.GetInstance(ms_img);
image.SetAbsolutePosition(HorizontalValue, verticalValue);
image.ScaleAbsolute(80f, 60f);
cb.AddImage(image);//PDF Content byte
I've gone through this
The image quality is becoming very poor due to stretching, following is the screenshot from the PDF File: