如何使用修补过的 qt 安装 wkhtmltopdf? [英] How to install wkhtmltopdf with patched qt?

查看:52
本文介绍了如何使用修补过的 qt 安装 wkhtmltopdf?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将 html 转换为 pdf,我使用 wkhtmltopdf.

I want to convert html to pdf, and I use wkhtmltopdf.

但是打印尺寸比我想象的要小.我想尝试 --disable-smart-shrinking 选项,但出现错误,如

But print size is smaller than I supposed. I want to try --disable-smart-shrinking option but error occured like

$ xvfb-run -- /usr/bin/wkhtmltopdf --disable-smart-shrinking $INPUT $OUTPUT
The switch --disable-smart-shrinking, is not support using unpatched qt, and will be ignored.Loading page (1/2)
Printing pages (2/2)
Done

也许我必须用修补过的 qt 安装 wkhtmltopdf,但我不知道如何安装.

Maybe I have to install wkhtmltopdf with patched qt, but I don't know how to install.

我看到以下尺寸,但 gitorious.org 不起作用.

I saw following size, but gitorious.org doesn't work.

wkhtmltopdf 修补 qt?

我的操作系统是Ubuntu14.04,wkhtmltopdf版本是0.12.2.1

My OS is Ubuntu14.04, and wkhtmltopdf version is 0.12.2.1

如果您知道打印更小的其他原因,请告诉我.谢谢.

If you know other reason to be printed smaller, tell me please. thanks.

推荐答案

您可以安装 wkhtmltopdf--disable-smart-shrinking 选项来自wkhtmltopdf.

You can install wkhtmltopdf with --disable-smart-shrinking option from wkhtmltopdf.

下载并安装它.

http://wkhtmltopdf.org/usage/wkhtmltopdf.txt

文档说

wkhtmltopdf 0.12.2.1(带补丁的qt)

wkhtmltopdf 0.12.2.1 (with patched qt)

--disable-smart-shrinking 禁用智能收缩策略由 WebKit 使用,使像素/dpi比率非常数

--disable-smart-shrinking Disable the intelligent shrinking strategy used by WebKit that makes the pixel/dpi ratio none constant

这篇关于如何使用修补过的 qt 安装 wkhtmltopdf?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆