Image FixHeight & FixWidth properties not working

Greetings.

I'm working with a c# project using Aspose.Pdf.

These two properties are not working for Aspose.Pdf.Image object:

Example:

Create an image 1x1 pixels size. Then try to stretch this image to create some sort of an image separator.

Image imageSeparator = new Image();
imageSeparator.File = System.IO.Path.GetFullPath(System.Web.Hosting.HostingEnvironment.MapPath("~/Content/Images/Separator.png"));
imageSeparator.FixHeight = 10;
imageSeparator.FixWidth = PageSize.A4.Width;
doc.Pages[1].Paragraphs.Add(imageSeparator);

That won't work, the image will still have the 1x1 size.

Please note, that same code with Aspose.Pdf.Generator.Image works well:

Image imageSeparator = new Image();
imageSeparator.ImageInfo.File = @"~\Content\Images\Separator.png";
imageSeparator.ImageInfo.FixHeight = 10;
imageSeparator.ImageInfo.FixWidth = PageSize.A4Width;
imageSeparator.ImageInfo.ImageFileType = ImageFileType.Png;

Hi Anton,


Thanks for using our products.

I
have tested the scenario and I am able to reproduce the same problem. For the
sake of correction, I have logged it in our issue tracking system as PDFNEWNET-35965. We
will investigate this issue in details and will keep you updated on the status
of a correction. <o:p></o:p>

We apologize for your inconvenience.

The issues you have found earlier (filed as PDFNEWNET-35965) have been fixed in Aspose.Pdf for .NET 9.2.0.

The blog post for this release is created over this link


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.