我有一个类似这个文档的文档,我想使用 Python 包docx :
将 DOCX 文件转换为 HTML 文件docx.convert_to_html(input)。
我想知道是否有任何方法或 Python 包可以从每一行中提取位置?位置表示每行在页面中相对位置的边界。
我希望我的最终 HTML 结果如下所示:
<line b="38" id="line_0" l="616" r="795" style="white-space:nowrap; position:absolute; left:616px;top:14px; font-size:19.0px; " t="14">DOC
# 2019-0046594<br></line>
无论格式如何,我都需要“l、r、b、t”这四个位置值。