【问题标题】:Generate PDF from HTML using Python with multiple orientation(Portrait and Landscape)使用 Python 多方向(纵向和横向)从 HTML 生成 PDF
【发布时间】:2019-03-09 03:58:38
【问题描述】:

我在 HTML 中设计了 PDF(模板)并在 Python 中转换/使用它。

我的 PDF 输出中需要两个方向(纵向和横向)?

【问题讨论】:

    标签: html django python-2.7 wkhtmltopdf pdfkit


    【解决方案1】:

    将您的页面作为单独的文件(一个在您的 wkhtml2pdf 调用中带有 -O 横向标志,一个没有)。您可以使用 subprocess 模块调用 ghostscript 在 python 中将文件连接在一起

    【讨论】:

      猜你喜欢
      • 2019-08-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-12-02
      • 1970-01-01
      • 1970-01-01
      • 2013-03-07
      相关资源
      最近更新 更多