FPDF-如何拥有不同尺寸的不同页面 [英] FPDF - How can I have different pages with different sizes
本文介绍了FPDF-如何拥有不同尺寸的不同页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我希望使用FPDF来创建多个页面,每个页面的大小都不同,但是我不知道如何使它工作.我假设以下内容:
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
是可以的,但是如果我没有在构造函数上指定宽度,或者如果我指定宽度,它只会使它们成为默认值(A4).
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.
我在做什么错了?
推荐答案
您需要传递"P"或"L"作为第一个参数.然后是数组的大小.
You need to pass 'P' or 'L' as the first argument. Then the size in array.
这篇关于FPDF-如何拥有不同尺寸的不同页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文