Skip to content

Images are not positioned correctly in the resulting DOCX file #80

@BangemannGuilherme

Description

@BangemannGuilherme

Images are not positioned correctly in the resulting DOCX file when inside a tag

. Instead of being inline with the text as they appear in the HTML, the images are placed in separate paragraphs, disrupting the intended layout.

Try the following HTML:

<html>
<body>
<div class="questao">
<p><strong>Questão 60</strong></p>
<p><p style="margin-bottom: 0cm; line-height: normal; mso-layout-grid-align: none; text-autospace: none;">Em 2011, a costa nordeste do Jap&atilde;o foi sacudida por um terremoto com magnitude de 8,9 graus na escala Richter. A energia liberada E por esse terremoto, em kWh pode ser calculada por <img src="https://simulado.metodomedicina.com.br/uploads/questoes/2024/07/30/66a8fc0828b04.png" style="width: 100px; height: 47px;"> sendo <img src="https://simulado.metodomedicina.com.br/uploads/questoes/2024/07/30/66a8fc0828b92.png"> e R a magnitude desse terremoto na escala Richter. Considere 0,84 como aproxima&ccedil;&atilde;o para log7.</p>
<p style="margin-bottom: 0cm; text-align: right; line-height: normal; mso-layout-grid-align: none; text-autospace: none;">Dispon&iacute;vel em: http://oglobo.globo.com. Acesso em: 2 ago. 2012.</p>
<p style="margin-bottom: 0cm; line-height: normal; mso-layout-grid-align: none; text-autospace: none;">&nbsp;</p>
<p>A energia liberada pelo terremoto que atingiu a costa nordeste do Jap&atilde;o em 2011, em kWh,&nbsp;foi de</p>
</p>
</div>
<div class="alternativa"><div class="content"><strong>A)</strong> <p><img src="https://simulado.metodomedicina.com.br/uploads/questoes/2024/07/30/66a8fc0828c4d.png" style="width: 81px; height: 38px;"></p></div></div><div class="alternativa"><div class="content"><strong>B)</strong> <p><img src="https://simulado.metodomedicina.com.br/uploads/questoes/2024/07/30/66a8fc0828cc3.png" style="width: 83px; height: 37px;"></p></div></div><div class="alternativa"><div class="content"><strong>C)</strong> <p><img src="https://simulado.metodomedicina.com.br/uploads/questoes/2024/07/30/66a8fc0828d4d.png" style="width: 83px; height: 40px;"></p></div></div><div class="alternativa"><div class="content"><strong>D)</strong> <p><img src="https://simulado.metodomedicina.com.br/uploads/questoes/2024/07/30/66a8fc0828db9.png" style="width: 83px; height: 37px;"></p></div></div><div class="alternativa"><div class="content"><strong>E)</strong> <p><p>10<sup>17,19</sup></p></p></div></div>
</body>
</html>

The images are OK in the HTML preview
image

But after converting to Docx, the images are placed in separate paragraphs.
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions