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

Image quality issue

Hi
 
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.Save();
            header.Graphics.ScaleTransform(.88f, .88f);
            header.Graphics.DrawImage(image, imageLocation);
            header.Graphics.Restore();
            doc.Template.Top = header;
Thanks
 
jc

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,

Praveen


Attachment: PDF_header_3a4adb12.zip

Loader.
Up arrow icon