使用wkhtmltopdf转pdf
简介wkhtmltopdf 能够把多个“对象”合并生成一个pdf文档,这些“对象”可以是“页面对象”、“封面对象”、或是“目录对象”。这些对象在pdf文档中的顺序可以通过命令行参数来指定。命令行参数包括两部分,一种是针对某一特定“对象”的命令行参数,另一种是全局的命令行参数。并且全局的命令行参数只能放在全局参数区([GLOBAL OPTION])中指定。
wkhtmltopdf官网:https://wkhtmltopdf.org/index.html
官网提示 linux需要这些动态库。depends on: zlib, fontconfig, freetype, X11 libs (libX11, libXext, libXrender)
1、下载二进制包:wkhtmltox-0.12.4_linux-generic-amd64.tar.xz
下载地址:https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz
2、解压压缩包:
tar -xvf wkhtmltox-0.12.4_linux-generic-amd64.tar.xz
3、安装依赖
出现:./wkhtmltopdf: error while loading shared libraries: libXrender.so.1: cannot open shared object file: No such file or directory
yum install libXrender*
出现:./wkhtmltopdf: error while loading shared libraries: libfontconfig.so.1: cannot open shared object file: No such file or directory
安装:yum install libfontconfig*
出现:./wkhtmltopdf: error while loading shared libraries: libXext.so.1: cannot open shared object file: No such file or directory
yum install libXext*
4、测试进入到bin目录下
./wkhtmltopdf http://www.baidu.com a.pdf
注意:转成的pdf乱码,这里就需要处理linux安装中文字体 请搜索 linux安装中文字体
无向图(Undirected Graph)
dumpe2fs命令用于导出ext2/ext3/ext4文件系统内部的相关信息,例如:文件系统的组成包含超级块、块组、inode、block等信息(该命令在Centos7下没有得到任何信息)
Nginx作为使用量非常大的Web服务器,但是如果遇到一个访问量比较大的网站,其访问日志会快速的进行增长,如果一直将所有的访问日志存放在一个文件中肯定是不对的,所以我们就需要对访问量大的访问日志进行分割,然后按照一定的时间删除不需要的日志文件。
快速生成表格
Electron页面跳转、浏览器打开链接和打开新窗口
在使用Git的过程中,不想每次都输入用户名和密码去拉取代码,所以就需要保存这些信息,那么既然有保存了,就必须有清除功能。
在Mac电脑中,如何对Git的用户名和密码进行修改呢?起初不懂Mac,所以整了很久,本文将记录如何对这个进行操作,以便后期使用。
Docker编译镜像出现:fetch http://dl-cdn.alpinelinux.org/alpine/v3.12/main/x86_64/APKINDEX.tar.gz
ERROR: http://dl-cdn.alpinelinux.org/alpine/v3.12/main: temporary error (try again later)
WARNING: Ignoring APKINDEX.2c4ac24e.tar.gz: No such file or directory问题