HTML turn PDF is implemented using WKHTMLTOPDF plugin

tags: java  html  xpdf

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

Intelligent Recommendation

JTIDY completed HTML tags and use WKHTMLTOPDF plugins to turn HTML to PDF

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...

wkhtmltopdf turn pdf pit

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...

HTML to PDF wkhtmltopdf tool

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 "...

Wkhtmltopdf export html to pdf

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-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...

More Recommendation

html to pdf error wkhtmltopdf

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...

Convert Html to PDF [wkhtmltopdf]

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...

WKHTMLTOPDF saves HTML as PDF

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...

Wkhtmltopdf to HTML to PDF

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...

Export PDF using wkhtmltopdf

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...

Copyright  DMCA © 2018-2026 - All Rights Reserved - www.programmersought.com  User Notice

Top