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

Free Support Forum - aspose.com

Insert Image - how to resize in cm or %?

Hi,


My ultimate goal is to resize all the images that don’t fit in my A4 doc (this could be a static width that I provide) to fit that size.

From the API I see that the insertImage supports resizing in “points” but I don’t understand the correspondence of that to the “cm” size that appears in my Word (format picture > size > absolute).

How can I achieve my goal or, at least, be able to resize to X cm or X percentage?

Hi

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

Thanks for your inquiry. You can use ConvertUtil class to convert between measurement units. Please see the following link for more information:

http://www.aspose.com/documentation/java-components/aspose.words-for-java/com/aspose/words/convertutil.html#millimeterToPoint(double)

Hope this helps. Please let me know if you need more assistance, I will be glad to help you.

Best regards.