Vogod
Vogod

Reputation: 23

Two pages per sheet using mpdf

Can I create a PDF with two pages per sheet using MPDF? If it's possible, how?

I can create an A4

$mpdf=new mPDF();

or an A5

$mpdf=new mPDF('c','A5');

but I've been reading the documentation and I've not seen the way to create an unique sheet (A4, for example) with two pages.

Upvotes: 0

Views: 618

Answers (2)

JFS
JFS

Reputation: 67

You can set a:

<!--mpdf
    <pagebreak>
mpdf-->

to produce a next page.

Another way is to use AddPageByArray() or AddPage().

Upvotes: 0

Vogod
Vogod

Reputation: 23

When you download this PHP class, there is a folder named "examples".

Example #43 explains how I can do it.

Upvotes: 1

Related Questions