【问题标题】:How to use convert's page parameter with php IMagick?如何在 php IMagick 中使用 convert 的页面参数?
【发布时间】:2015-08-12 09:29:55
【问题描述】:

我需要为生成的 pdf 文件设置纸张大小。我如何使用 php 的 IMagick 对象来做到这一点?如果我使用 shell convert,我会使用 page 参数。

【问题讨论】:

    标签: php pdf imagemagick pdf-generation imagick


    【解决方案1】:

    对于,您将使用方法Imagick::setImagePage。

    您需要查找适当的尺寸以匹配特定的页面名称。请参阅page 文档。

    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
    

    【讨论】:

      猜你喜欢
      • 2013-08-28
      • 2014-07-07
      • 2012-04-20
      • 2012-01-17
      • 2017-09-27
      • 2021-01-11
      • 2023-02-03
      • 2012-12-11
      • 1970-01-01
      相关资源
      最近更新 更多