Words image wrap font metrics

Hi,

I am creating a PDF file from HTML using the .InsertHtml method. As part of creating the document I loop through all shapes and align images right as well as add some borders.

shape.WrapType = WrapType.Square;
shape.ImageData.Borders.Bottom.LineWidth = 20;
shape.ImageData.Borders.Left.LineWidth = 20;
shape.HorizontalAlignment = Aspose.Words.Drawing.HorizontalAlignment.Right;

This all seems to work as it should and when exported to word looks exactly as I want it to. My problem is that when I save to pdf the text seems to be slightly larger and ends up below the aligned images. This is most apparent in the line near the bottom of the black and white glasses image with the sentence “Duis aute irure dolor in reprehenderit” I have attached the exported doc and pdf as well as the html it is created from (it’s only on a local server so the images won’t show). Is there any way to fix the font size / style to ensure that my text displays as it does in the .doc version?

Thanks

Hi Craig,

Thanks for your inquiry. Perhaps, you’re using an older version of Aspose.Words; as with Aspose.Words v11.4.0, I was unable to reproduce this issue on my side during rendering your DOC file to PDF format. I would suggest you please upgrade to the latest version of Aspose.Words i.e. v11.4.0. I hope, this will help.

Best Regards,

Hi Craig,

Thanks for the additional information and sorry for the delayed response. I am working over your query and will get back to you as soon as possible.

Best Regards,

Hi Craig,

Thanks for your patience. The problem occurs because you’re using ‘shape.WrapType = WrapType.Square;’. You may delete this line of code. Moreover, please read different text wrapping options here:
https://reference.aspose.com/words/net/aspose.words.drawing/wraptype/

If we can help you with anything else, please feel free to ask.

Best Regards,