wkhtmltopdf:哪些纸张尺寸有效?

2021-12-28 00:00:00 wkhtmltopdf printing php

我正在使用 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;

相关文章