wkhtmltopdf: What paper sizes are valid?(wkhtmltopdf:哪些纸张尺寸有效?)
问题描述
我正在使用 wkhtmltopdf(html to pdf converter) 并通过 php 运行它shell_exec
.
I am using wkhtmltopdf(html to pdf converter) and am running it through a php shell_exec
.
当运行 wkhtmltopdf --help
时,一个选项是 size,帮助文本是
When running wkhtmltopdf --help
one option is size, with the help text being
将纸张尺寸设置为:A4、Letter 等
Set paper size to: A4, Letter, etc.
我想知道是否有人有此可执行文件将运行的纸张尺寸列表?
I am wondering if someone has a list of paper sizes this executable will run?
具体版本为wkhtmltopdf-0.9.9-static-i386
推荐答案
如果你看一看 项目存储库中的 pdfsettings.cc 源,您会找到这个列表,在我看来,它类似于已接受的命名纸张尺寸列表.
If you take a look through the pdfsettings.cc source in the project repository, you'll find this list, which looks to me like the accepted list of named paper sizes.
res["A0"] = QPrinter::A0;
res["A1"] = QPrinter::A1;
res["A2"] = QPrinter::A2;
res["A3"] = QPrinter::A3;
res["A4"] = QPrinter::A4;
res["A5"] = QPrinter::A5;
res["A6"] = QPrinter::A6;
res["A7"] = QPrinter::A7;
res["A8"] = QPrinter::A8;
res["A9"] = QPrinter::A9;
res["B0"] = QPrinter::B0;
res["B1"] = QPrinter::B1;
res["B10"] = QPrinter::B10;
res["B2"] = QPrinter::B2;
res["B3"] = QPrinter::B3;
res["B4"] = QPrinter::B4;
res["B5"] = QPrinter::B5;
res["B6"] = QPrinter::B6;
res["B7"] = QPrinter::B7;
res["B8"] = QPrinter::B8;
res["B9"] = QPrinter::B9;
res["C5E"] = QPrinter::C5E;
res["Comm10E"] = QPrinter::Comm10E;
res["DLE"] = QPrinter::DLE;
res["Executive"] = QPrinter::Executive;
res["Folio"] = QPrinter::Folio;
res["Ledger"] = QPrinter::Ledger;
res["Legal"] = QPrinter::Legal;
res["Letter"] = QPrinter::Letter;
res["Tabloid"] = QPrinter::Tabloid;
这篇关于wkhtmltopdf:哪些纸张尺寸有效?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:wkhtmltopdf:哪些纸张尺寸有效?
基础教程推荐
- phpmyadmin 错误“#1062 - 密钥 1 的重复条目‘1’" 2022-01-01
- PHP 守护进程/worker 环境 2022-01-01
- 在 yii2 中迁移时出现异常“找不到驱动程序" 2022-01-01
- HTTP 与 FTP 上传 2021-01-01
- 如何在 XAMPP 上启用 mysqli? 2021-01-01
- Doctrine 2 - 在多对多关系中记录更改 2022-01-01
- 在 CakePHP 2.0 中使用 Html Helper 时未定义的变量 2021-01-01
- 如何在 Symfony 和 Doctrine 中实现多对多和一对多? 2022-01-01
- 使用 PDO 转义列名 2021-01-01
- 找不到类“AppHttpControllersDB",我也无法使用新模型 2022-01-01