我想将 fpdf 中的纸张大小设置为字母大小的一半,大约为 8.5x5.5 inc。我该怎么做?
我的 php 语言的 fpdf 函数是
$pdf = new FPDF('P','mm','?????');
有什么解决办法吗?之前感谢您的帮助..
最佳答案
他们在 documentation for the FPDF constructor 中说:
FPDF([string orientation [, string unit [, mixed size]]])
This is the class constructor. It allows to set up the page size, the orientation and the unit of measure used in all methods (except for font sizes). Parameters ...
size
The size used for pages. It can be either one of the following values (case insensitive):
A3 A4 A5 Letter Legal
or an array containing the width and the height (expressed in the unit given by unit).
他们甚至给出了一个自定义尺寸的例子:
Example with a custom 100x150 mm page size:
$pdf = new FPDF('P','mm',array(100,150));
关于php - 在 FPDF 中设置纸张大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10426853/