HTML turn PDF is implemented using the WKHTMLTOPDF plugin:
download link:
1, the CD to the bin directory is as follows:

2, enter the corresponding instruction:
(1) Convert the local HTML file to PDF.
wkhtmltopdf.exe --header-line --header-html https://dev-xxx.xxx.com.cn/header.html --margin-top 20mm --header-spacing 2 --footer-font-size 8 --footer-center [page]/[toPage] --footer-line --footer-spacing 1 D:/aa.html D:/a.pdf
(2) Convert cost PDF file according to the remote HTML address (Encode).
wkhtmltopdf.exe --header-line --header-html https://dev-xxx.xxx.com.cn/header.html --margin-top 20mm --header-spacing 2 --footer-font-size 8 --footer-center [page]/[toPage] --footer-line --footer-spacing 1 https://www.baidu.com/index.php?tn=monline_6_dg D:/a.pdf
** Note: ** The above -Header parameter is to add the HTML plus fixed header to PDF. More parameters can be viewed:About wkhtmltopdf: html to pdf command line tool
I have encountered problems: HTML turns PDF when the page is too wide, and later found that the HTML tag is not closed. Use IText to PDF, some table forms HTML turns on the PDF Solutions: Get html fil...
I use this tool Vue turn the page, start no problem, until one day the leadership asked me to add functionality for personal reasons, adding a bit of code On the addition of such a line to die, then I...
related articles HTML to PDF wkhtmltopdf tool introduction Definition of Terms Document object "Document object" refers to a document object in a PDF document. There are three types of "...
1, use the background Recently, the company needs to generate pdf and download the contents of the html page. I tried many methods and did not have satisfactory results. Later, I found the software wk...
Go-wkhtmltopdf to html as pdf: go get -u github.com/SebastiaanKlippert/go-wkhtmltopdf vi /etc/profile export GOPATH=/usr/lib/go/bin :wq source /etc/profile vi a1.go package main import ( "fmt&quo...
Personal environment configuration Problem description When converting multiple html files into pdf, prompt: This version of wkhtmltopdf is build against an unpatched version of QT I found the followi...
Today I am going to write a resume, and then happily entered a "free" online resume writing website, and started creating resumes. write. . . save. . . download. . . [Please activate members...
One. Download Direct Baidu to official website download Second. Installation After installation, the directory to bin is configured to environment variables. III. Code use ** Notice: The output path i...
premise: HTML files, and there is data in it Target: Generate PDF file step: 1. Create the HTML template and construct the storage path of the file 2. Use Data and HTML to generate HTML static files 3...
What is WKHTMLTOPDF? QuoteOfficial websiteA sentenceļ¼ wkhtmltopdf and wkhtmltoimage are open source (LGPLv3) command line tools to render HTML into PDF and various image formats using the Qt WebKit re...