我已通过Libre Office将docx文件导出到XHTML中,并将其编码为base 64中的图像:
<img style="height:0.647cm;width:0.743cm;" alt="" src="data:image/*;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAYCAIAAABm/grVAAAAA3NCSVQFBgUzC42AAAAAAXNSR0IArs4c6QAAAkpJREFUSEvllTFoU0EYx7/KG+5BhnvQ4QV0CERohEJfJi042M2MFZcGB6kOEjpIstlJikNtnKKdSgdJB4duqYM0Y1IIJIXKyxDxFVp4DwzcDQ/uAwPnJa/UmJwmSBfxho/jeN/v/b/v/x03I6WEq17XrhrY5/3n0BmtUdWjIBDEDdAkRCBaBvGREcNEFJYBDBEMgogpComElbltjxijh779yMGglglMoGUSJuB3e37afvE0NQLVG+Vz5CF3zwIMUcU/7D2OmvlR5Y+vrX0mvw+OJ8Xcm+Z4uqGdUxaqrgH04DK2jlpE9bGHUaTQNr0KmV3M030434Drd37h6JV+YFLI3Ka/8vLr6qav9m7D/fklq7FqXnZqUgjZOXTfrYxA9EqV18qo0pp9qVSpu9DC69Ct0vkH/EuNgoCYZc0mpjLK6k/PgBIFRGfBgRAgqGO3AsllwDKNMa++533ase+vTwVlKKLeRUoJkNZxy/u8B7xCktl+Ewmq0zgRxY4DMTIVNNJY2ObZ196T7aDvGGtapAlzEdECbvN6G5wC643WrlL1PVX1IuDWY9VTVHqD0wNqtOnCKpwXgZjQpbzRpg93ENW9qo7Pj3746UXtqDSykwPh10wjjcfr/dvZtRWR3N3oEwcTNg7VX9Pi+xYLSRAiIZDBQuZ5JdjN+mc1uJFGDmW2zCChilHE9LyVf+SMcrVzOnxYeubIRkmelN1XS4drKfmNTUzRKx3+c3YpvpSM37oZt+cWE/dyEKMTH4vJ0ImIaY36C9Bwyr/zRv0AJXP6SKxkbXEAAAAASUVORK5CYII="/>
以下是相应的JSFiddle。
我尝试过的事情:
height
和width
属性没有任何区别。答案 0 :(得分:1)
Libre Office使用src="data:image/*
输出图片,但我使用src="data:image/png
解决了问题。