Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

wkhtmltopdf: What paper sizes are valid?

I am using wkhtmltopdf(html to pdf converter) and am running it through a php shell_exec.

When running wkhtmltopdf --help one option is size, with the help text being

Set paper size to: A4, Letter, etc.

I am wondering if someone has a list of paper sizes this executable will run?

The specific version is wkhtmltopdf-0.9.9-static-i386

like image 586
Hailwood Avatar asked Jun 18 '11 08:06

Hailwood


People also ask

What size paper is universal?

Universal paper size is a user‑defined setting that lets you print on paper sizes that are not preset in the printer menus. Notes: The smallest supported Universal size is 70 x 127 mm (2.76 x 5 inches) for one‑sided printing and 105 x 148 mm (4.13 x 5.83 inches) for two‑sided (duplex) printing.

What size is isb5 paper?

A B5 piece of paper measures 176 × 250 mm or 6.9 × 9.8 inches.

What is generic paper size?

Tip. If you're in the United States or Canada, standard printer paper dimensions for most documents is that of the standard letter paper size, which is 8.5 inches by 11 inches. In much of the rest of the world, it is A4, which is 297 millimeters by 210 millimeters.


1 Answers

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;
like image 118
Matt Gibson Avatar answered Sep 22 '22 03:09

Matt Gibson