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

Free Support Forum - aspose.com

Shape size incorrect

Since versión 15.6 form Aspose Words my code has changed its behaviour. When it makes a new Aspose.Words.Drawing.Shape object with an Imagen in png format. (try with one much wider than taller like a ruler meausered in cm o something similar with size 1 cm x 19 cm) the sizes of the inserted image is incorrect. The projected image shape is about 0,85 cm and 17,2 cm in the final document.

Here is some code to document this:

This overload work correctly:
DocumentBuilder.InsertImage(ImageRule, ConvertUtil.MilimeterToPoint(190), ConvertUtil.MilimeterToPoint(10));

But this oveload does not work:
DocumentBuilder.InsertImage(ImageRule);

It seems like the automatic method does not work. My ImageRule is 300x300 ppp
whitdh 190/25.4 *300 =2244 pixels and height=10/25.4*300=118 pixels

Hi Gregorio,

Thanks for your inquiry. It would be great if you please share following detail for investigation purposes.


  • Please attach your input Word document and images.
  • Please

    create a standalone/runnable simple application (for example a Console
    Application Project
    ) that demonstrates the code (Aspose.Words code) you used to generate
    your output document

  • Please attach the output Word file that shows the undesired behavior.
  • Please
    attach your target Word document showing the desired behavior. You can
    use Microsoft Word to create your target Word document. I will
    investigate as to how you are expecting your final document be generated
    like.

Unfortunately,
it is difficult to say what the problem is without the Document(s) and
simplified application. We need your Document(s) and simple project to
reproduce the problem. As soon as you get these pieces of information to
us we’ll start our investigation into your issue.