god*_*eed 6 qt pdf-generation wkhtmltopdf
哪些步骤将重现该问题?1. wkhtmltopdf.exe --disable-smart-shrinking --print-media-type --page-size A4 --dpi 96 --margin-top 25 --margin-bottom 25 file:///.../ debug.html mytest.pdf
什么是预期的输出?我希望在结果pdf文件中看到非收缩内容
你看到了什么呢?结果pdf文件中的内容缩小
您使用的是什么版本的wkhtmltopdf?0.11.0 rc2
什么操作系统?Windows 7 64位
问题有点宽泛.我需要在一些div之前插入分页符,具体取决于它们的高度.我写了相应的脚本.但事情是在"缩小的世界"中由脚本分析的坐标发生变化,结果是丑陋的.所以我需要禁用收缩才能使其正常工作.
另一方面,文档说'--disable-smart-shrinking'是"仅使用修补的QT".我的'wkhtmltopdf'版本是否实现了这个功能?我怎么能找到它?我应该安装QT甚至重建wkhtmltopdf吗?
小智 1
正如您所指出的“--disable-smart-shrinking 仅可使用修补的 QT”。
要了解您正在使用哪个版本的 wkhtmltopdf,请打开终端并运行:
wkhtmltopdf -V
Run Code Online (Sandbox Code Playgroud)
它应该告诉您是否正在使用修补版本。例如:
wkhtmltopdf 0.12.6.1 (with patched qt)
Run Code Online (Sandbox Code Playgroud)
如果您的版本没有修补的 qt,请将其删除并在https://wkhtmltopdf.org/downloads.html上获取适合您系统的版本