Reputation: 7426
I need to set the paper size for the resulting pdf file. How do I do it with php's IMagick object? I would use the page
parameter if I used shell convert
.
Upvotes: 1
Views: 703
Reputation: 24419
With imagick you would use the methods Imagick::setImagePage.
You would need to look up the proper dimensions to match a specific page-name. See page documents.
11x17 792 x 1224
Ledger 1224 x 792
Legal 612 x 1008
Letter 612 x 792
LetterSmall 612 x 792
ArchE 2592 x 3456
ArchD 1728 x 2592
ArchC 1296 x 1728
ArchB 864 x 1296
ArchA 648 x 864
A0 2380 x 3368
A1 1684 x 2380
A2 1190 x 1684
A3 842 x 1190
A4 595 x 842
A4Small 595 x 842
A5 421 x 595
A6 297 x 421
A7 210 x 297
A8 148 x 210
A9 105 x 148
A10 74 x 105
B0 2836 x 4008
B1 2004 x 2836
B2 1418 x 2004
B3 1002 x 1418
B4 709 x 1002
B5 501 x 709
C0 2600 x 3677
C1 1837 x 2600
C2 1298 x 1837
C3 918 x 1298
C4 649 x 918
C5 459 x 649
C6 323 x 459
Flsa 612 x 936
Flse 612 x 936
HalfLetter 396 x 612
Upvotes: 2