I’m using the Aspose Linq Reporting Engine (C#) to generate a word document. Some of the values that are inserted in the document are saved in HTML-format using the TinyMCE library. I am inserting these values using the following syntax:
In most cases, this works wonderfully, but I’m running into an issue when I want to insert a horizontally centered image. The TinyMCE library exports such an image as follows:
<p> <img style="display: block; margin-left: auto; margin-right: auto;" src="lion.jpg" width="200" height="200"/> </p>
In the browser, this image is shown centered, because of the
margin-left: auto; margin-right: auto attributes. However, in the report, the image is simply left-aligned.
What can I do to make sure this image is centred in the output document? Is there another html attribute that is picked up correctly that I could use? Or a setting that I can enable?
I have included a sample application that demonstrates this behaviour here:
CenteredImage.zip (525.1 KB)