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

Crop PdfImage or page.Graphics.DrawImage prevent keep ratio

I wasn't able to crop or draw image without keeping aspect ratio.
using (var html = new HtmlConverter())
                            PdfImage image = PdfImage.FromImage(html.FromString(htmlText, ImageType.Bitmap, (int)textFieldbounds.Width, (int)textFieldbounds.Height));
                            page.Graphics.DrawImage(image, textFieldPosition.X, textFieldPosition.Y, textFieldbounds.Width, textFieldbounds.Height);
but for large html markup it's looks very ugly. Something should be defenetely readable (like order number, but description can be cut).

1 Reply

PH Praveenkumar H Syncfusion Team June 4, 2013 04:34 AM UTC

Hi Evgeny,

Thank you for using Syncfusion products,

Please create the direct trac incident with sample project which reproduces the issue.

It will help us investigate further in this issue.

Please let us know if you have any concern,

With Regards,

Live Chat Icon For mobile
Up arrow icon