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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Image in the header is stretching?

Thread ID:





127753 Dec 7,2016 12:02 AM UTC Dec 8,2016 12:41 PM UTC Xamarin.Forms 1
Tags: PDF
Asked On December 7, 2016 12:02 AM UTC

I added an icon in the header as template but whatever point, size I set up, It always stretches. my Image has originally 144x144 size. Therefore I expect it to be not strecthed. How can I adjust this please? Maybe I am missing the point of how to use PointF, RectangleF etc? 

          PdfPage page = pdfDocument.Pages.Add();
           PointF bounds = new PointF(0, 20);
            PdfPageTemplateElement header = new PdfPageTemplateElement(bounds, new SizeF(144,144));
            header.Alignment = PdfAlignmentStyle.TopCenter;
            Stream imgStream = typeof(App).GetTypeInfo().Assembly.GetManifestResourceStream("Images.icon.jpg");

            header.Graphics.DrawImage(PdfImage.FromStream(imgStream), new RectangleF( 0,20, 144,144));
             pdfDocument.Template.Top = header;

Sasi Kumar Sekar [Syncfusion]
Replied On December 8, 2016 12:41 PM UTC

Hi Emil, 
Thank you for contacting Syncfusion support, 
We can able to reproduce the mentioned image is stretch out the header bounds and we created the new incident for this. So kindly follow up the newly created incident for further updates. 
Please find the below link to login the Direct account. 
using the above link, you can track the newly created incident. 
Please let us know if you need further assistance. 


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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon 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.Close Icon