FPDF - How can I have different pages with differe

2019-08-02 00:56发布

问题:

Using FPDF, I wish to have multiple pages each with a different size, but I can't work out how to get it to work. I assumed that the following:

$pdf ->AddPage(Array(55,85));       
//add first page content

$pdf ->AddPage(Array(139,99));
//add second page content

would work, but it just makes them both the default (A4) if I don't specify a width on the constructor, or the width I specify if I do.

What am I doing wrong?

回答1:

You need to pass 'P' or 'L' as the first argument. Then the size in array.



标签: php fpdf