← 返回命令列表

Linux command

prince 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Convert HTML to PDF

prince [input.html] -o [output.pdf]

Apply CSS stylesheet

prince -s [style.css] [input.html] -o [output.pdf]

Convert from URL

prince [https://example.com] -o [page.pdf]

Multiple inputs

prince [page1.html] [page2.html] -o [combined.pdf]

说明

Prince is a commercial HTML/CSS to PDF converter with excellent standards compliance. It produces high-quality PDFs suitable for print production.

参数

-o, --output _file_
Output PDF file.
-s, --style _file_
Additional CSS file.
--javascript
Enable JavaScript.
--media _type_
CSS media type.
--page-size _size_
Page dimensions.
--page-margin _margin_
Page margins.
--encrypt
Encrypt PDF.

FAQ

What is the prince command used for?

Prince is a commercial HTML/CSS to PDF converter with excellent standards compliance. It produces high-quality PDFs suitable for print production.

How do I run a basic prince example?

Run `prince [input.html] -o [output.pdf]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -o, --output _file_ do in prince?

Output PDF file.