We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Image quality issue

i am inserting as logo into the header of a pdf but the image quality on the pdf is very poor and does not
reflect the quality of the image it is using.
the image is a png and 256 by 102 px.
The code I am using is
     PdfBitmap image = PdfImage.FromFile(basePath + "\\Images\\PDFReports\\logo.png") as PdfBitmap;
            PointF imageLocation = new PointF(doc.Pages[0].GetClientSize().Width - 140 , 20);
            RectangleF rect = new RectangleF(0, 0, doc.Pages[0].GetClientSize().Width, 90);
            PdfPageTemplateElement header = new PdfPageTemplateElement(rect);
            image.Quality = 100;
            header.Graphics.ScaleTransform(.88f, .88f);
            header.Graphics.DrawImage(image, imageLocation);
            doc.Template.Top = header;

1 Reply

PH Praveenkumar H Syncfusion Team April 28, 2014 04:45 AM UTC

Hi Jonathan,

Thank you for using syncfusion products,

We afraid that we are not able to reproduce the issue.

We have attached sample project for your reference, please modify the sample to reproduce the issue, and send the sample back to us.

Please let us know if you need further assistance.

With Regards,


Attachment: PDF_header_3a4adb12.zip

Live Chat Icon For mobile
Up arrow icon