【问题标题】:Pdf alignment issue when converting from html从html转换时的PDF对齐问题
【发布时间】:2012-07-13 07:12:02
【问题描述】:

我在 django 工作。我转换了

的html代码
<table border="1">
            <tr height="50px"><td><b>Name</b></td></tr>
            <tr height="220px"><td>Description</td></tr>
            <tr height="50px"><td>Mail</td></tr>
</table>

在 django 中使用 pisa 转换为 pdf。除了对齐之外,一切都很顺利。正如我在 html 表格高度中提到的那样,我需要 pdf 中的行间距。 谁能帮我在pdf(行间距)中获得与html相同的对齐方式?

【问题讨论】:

标签: html django pdf


【解决方案1】:

这是一种不好的编码习惯。您应该在单独的 CSS 中而不是在 html 中进行所有对齐。

【讨论】:

  • 尽管我尝试使用 css 作为高度,但我并没有像在 html 中那样正确地获得 pdf 对齐
猜你喜欢
  • 2018-04-16
  • 2023-04-04
  • 2018-01-14
  • 1970-01-01
  • 1970-01-01
  • 2013-02-23
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多