我正在使用wkhtmltopdf(html to pdf converter)并通过php shell_exec
运行它。
运行wkhtmltopdf --help
时,一个选项是大小,帮助文本为
将纸张尺寸设置为:A4,Letter等
我想知道某人是否有可执行文件将会运行的纸张尺寸列表?
答案 0 :(得分:32)
如果您查看pdfsettings.cc source in the project repository,您会找到此列表,它在我看来就像已接受的指定纸张尺寸列表一样。
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;
答案 1 :(得分:2)
我尝试了以下内容,他们为我工作: