TCPDF Custom page size

前端 未结 7 1546
执笔经年
执笔经年 2020-12-09 08:35

This example on tcpdf\'s website shows how to use page formats like A4, A5 etc, but how do I set tcpdf to use custom sizes like 175mm x 266 mm?

Solutions appreciated.

7条回答
  •  春和景丽
    2020-12-09 09:24

    Go to /config/tcpdf_config.php and around line 117, modify the line:

    define ('PDF_PAGE_FORMAT', 'A4');
    

    by

    define ('PDF_PAGE_FORMAT', 'LETTER');
    

    It is important to put "LETTER" in uppercase, you can see all possible values in this file: tcpdf/include/tcpdf_static.php.

提交回复
热议问题