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 in the header is stretching?

Thread ID:

Created:

Updated:

Platform:

Replies:

127753 Dec 6,2016 07:02 PM Dec 8,2016 07:41 AM Xamarin.Forms 1
loading
Tags: PDF
Emil
Asked On December 6, 2016 07:02 PM

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 07:41 AM

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. 
 
Regards, 
Sasi. 


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.

;