Linux CentOS7 安装wkhtmltopdf工具
wkhtmltopdf是一款将html文件转换成pdf格式的优秀的文件内容转换工具。它使用QT作为渲染引擎,目前它的RELEASE版尚不支持flex布局的Html5代码转换。使用flex的嵌套元素将会像没有style修饰的块级元素似的被转换。但是它的测试版使用较新的Qt引擎,可以部分支持flex效果。
安装步骤:
1. 官网下载wkhtmltopdf测试版本0.13.0的rpm包——https://wkhtmltopdf.org/downloads.html;
2. 使用yum安装环境,(我用的是webtatic的yum源,依赖包挺全的,之前装的php70w也是通过它)
(1)yum install icu.x86_64
(2)yum install xorg-x11-fonts-75dpi.noarch
(3)yum install xorg-x11-fonts-Type1.noarch
(4)yum install xorg-x11-server-Xvfb ——(官网里对测试版安装时的提示:Builds for OS X will be made available as soon as support for it is added in the build script, which is an ongoing process. Please note that the above linux builds are not headless, and will require running under xvfb.否则运行‘wkhtmltopdf’转换命令时会报错‘QXcbConnection: Could not connect to display Aborted (core dumped)’)
3. 安装wkhtmltopdf包
4. 使用‘xvfb-run wkhtmltopdf html文件 pdf文件’就可以完成转换。
最后flex布局的H5代码转换后,某些特性依然没有转换过来,比如'align-item'、使用flex项目属性的内联元素依然不具备width属性。
Linux CentOS7 安装wkhtmltopdf工具的更多相关文章
- Linux centos7安装Mongodb
Linux centos7安装Mongodb-4.0 1.下载 官方下载地址:https://www.mongodb.com/download-center/community 2.上传解压 1)rz ...
- Linux下安装项目管理工具Redmine
http://www.redmine.org.cn/download Linux下安装项目管理工具Redmine1.Ruby安装Ruby on Rails网站推荐使用1.8.7版. 点击(此处)折叠或 ...
- Linux下安装yum工具
Linux下安装yum工具 http://blog.csdn.net/caoshichaocaoshichao/article/details/13171919
- Linux CentOS7 安装 Qt 5.9.2
Linux CentOS7 安装 Qt 5.9.2 参考链接 http://doc.qt.io/qt-5/linux.html sudo yum groupinstall "C Develo ...
- LINUX CentOS7安装字体库
LINUX CentOS7安装字体库 2017年12月26日 17:06:07 q260996583 阅读数:4866更多 个人分类: linux JAVA画图时常用到Font 类对象 这样的对象 ...
- Linux上安装编译工具链
在Linux上安装编译工具链,安装它会依赖dpkg-dev,g++,libc6-dev,make等,所以安装之后这些依赖的工具也都会被安装.ubuntu软件库中这么描述 Informational l ...
- linux(centos7) 安装nginx
linux(centos7) 安装nginx 1.14(stable) 版本 Nginx配置文件常见结构的从外到内依次是「http」「server」「location」等等,缺省的继承关系是从外到内, ...
- centos7安装nslookup工具、ntp工具
2018-12-13 centos7安装nslookup工具 yum install bind-utils -y DNS解析localhost到本机 # .检测 [root@node2 ~]# nsl ...
- linux centos7 安装常用软件java,node,mysql,Seafile
linux centos7 安装常用软件java,node,mysql,Seafile 安装压缩解压缩软件 yum install -y unzip zip 安装git yum install -y ...
随机推荐
- centos6.5搭建hadoop完整教程
https://blog.csdn.net/hanzl1/article/details/79040380 博客地址http://blog.csdn.net/pucao_cug/article/det ...
- jQuery 中的事件绑定
一.事件概念 和数据库中的触发器一样,当操作了数据的时候会引发对应的触发器程序执行 一样,JS 中的事件就是对用户特定的行为作出相应的响应的过程,其实上就是浏览器 监听到用户的某些行为的时候会执行对应 ...
- Python Threading问题:TypeError in Threading. function takes 1 positional argument but 100 were given
在使用python多线程module Threading时: import threading t = threading.Thread(target=getTemperature, args = ( ...
- ABP之N层架构
介绍 应用程序代码库的分层是一种广泛接受的技术,有助于降低复杂性并提高代码的可重用性. 为了实现分层体系结构,ASP.NET Boilerplate遵循领域驱动设计(DDD)的原则. 领域驱动设计(D ...
- C#字符串和ASCII码的转换
//字符转ASCII码: public static int Asc(string character) { if (character.Length == 1) { System.Text.ASCI ...
- js作用域零碎的知识点,不同的script块,虽然同是全局变量
如下代码,第一次弹出a,因为解析器里找到var a,赋予a变量undefined,弹出undefined <!DOCTYPE html> <html> <head> ...
- mysql 不同索引的区别和适用情况总结
最近在做sql优化,看到一篇有关sql索引不错的文章,转载一下. 一.索引类型 普通索引:INDEX 允许出现相同的索引内容 (normal) 唯一索引:UNIQUE 不可以出现相同的值,可以有NUL ...
- Python进阶10---魔术方法*
特殊属性 查看属性 #animal.py class Animal: x = 123 def __init__(self,name): self._name = name self.__age = 1 ...
- js 时间格式,加减
Date.prototype.Format = function (fmt) { //author: rixiao var o = { "M+": this.getMonth() ...
- MDS
转载:https://blog.csdn.net/victoriaw/article/details/78500894 多维缩放(Multidimensional Scaling, MDS)是一组对象 ...