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.
Unfortunately, activation email could not send to your email. Please try again.

Image quality issue

Thread ID:

Created:

Updated:

Platform:

Replies:

116198 Apr 23,2014 05:16 AM Apr 28,2014 12:45 AM ASP.NET Web Forms (Classic) 1
loading
Tags: PDF
jonathan crawford
Asked On April 23, 2014 05:16 AM

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

Praveenkumar H [Syncfusion]
Replied On April 28, 2014 12:45 AM

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

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;