PDF中加入HTML,将PDF导入/嵌入到HTML中(For PDF)

wkhtmltopdf是一款用于将HTML页面转换为PDF文档的工具。它支持多个HTML页面到一个PDF文件的转换,并提供了丰富的命令行选项来定制输出。用户可以指定页面大小、方向等,并能创建目录及封面。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

如果在Linux上运行,检查出wkhtmltopdf

手册页如下:

Name:

wkhtmltopdf 0.12.2.4

Synopsis:

wkhtmltopdf [GLOBAL OPTION]... [OBJECT]...

Document objects:

wkhtmltopdf is able to put several objects into the output file, an object is

either a single webpage, a cover webpage or a table of content. The objects

are put into the output document in the order they are specified on the

command line, options can be specified on a per object basis or in the global

options area. Options from the Global Options section can only be placed in

the global options area

A page objects puts the content of a singe webpage into the output document.

(page)? [PAGE OPTION]...

Options for the page object can be placed in the global options and the page

options areas. The applicable options can be found in the Page Options and

Headers And Footer Options sections.

A cover objects puts the content of a singe webpage into the output document,

the page does not appear in the table of content, and does not have headers

and footers.

cover [PAGE OPTION]...

All options that can be specified for a page object can also be specified for

a cover.

A table of content object inserts a table of content into the output document.

toc [TOC OPTION]...

All options that can be specified for a page object can also be specified for

a toc, further more the options from the TOC Options section can also be

applied. The table of content is generated via XSLT which means that it can be

styled to look however you want it to look. To get an aide of how to do this

you can dump the default xslt document by supplying the

--dump-default-toc-xsl, and the outline it works on by supplying

--dump-outline, see the Outline Options section.

Description:

Converts one or more HTML pages into a PDF document, *not* using wkhtmltopdf

patched qt.

Global Options:

--collate Collate when printing multiple copies

(default)

--no-collate Do not collate when printing multiple

copies

--copies Number of copies to print into the pdf

file (default 1)

-H, --extended-help Display more extensive help, detailing

less common command switches

-g, --grayscale PDF will be generated in grayscale

-h, --help Display help

--license Output license information and exit

-l, --lowquality Generates lower quality pdf/ps. Useful to

shrink the result document space

-O, --orientation Set orientation to Landscape or Portrait

(default Portrait)

-s, --page-size Set paper size to: A4, Letter, etc.

(default A4)

-q, --quiet Be less verbose

--read-args-from-stdin Read command line arguments from stdin

--title The title of the generated pdf file (The

title of the first document is used if not

specified)

-V, --version Output version information and exit

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值