python设置pdf

Posted WU大雄

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了python设置pdf相关的知识,希望对你有一定的参考价值。

导出:选用pdf

参考官方链接:https://wkhtmltopdf.org/usage/wkhtmltopdf.txt

设置导出的大小可以用page-size也可以直接page-wight,page-height:

Page sizes:
  The default page size of the rendered document is A4, but using this
  --page-size optionthis can be changed to almost anything else, such as: A3,
  Letter and Legal.  For a full list of supported pages sizes please see
  <http://qt-project.org/doc/qt-4.8/qprinter.html#PaperSize-enum>.

  For a more fine grained control over the page size the --page-height and
  --page-width options may be used

 

以上是关于python设置pdf的主要内容,如果未能解决你的问题,请参考以下文章