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

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;

1 Reply

SK Sasi Kumar Sekar Syncfusion Team 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. 
 
Regards, 
Sasi. 


Loader.
Up arrow icon