We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Images width and hight not coming correct when Width and Hight has px

Images in my HTML are auto generated with hight and width attributes are set like the following

when converting this html, the images came with the original size.

When we changed the image tag manually to

without the PX in the attribute, the converted document came correctly with the correct size

Is there any way to convert correctly with the correctly hight and width when they contain the “px” since this the html is auto generated.


<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your inquiry. In height and width attributes of IMG tag, you cannot specify measurement units. Height and width can be specified in pixels (without any units) and in percents (like this height=’100%’). Please see HTML specification for more information:


Best regards.