LoginSignup
4
8

More than 5 years have passed since last update.

mPDF 1ページ目をLandscape(横向き)表示するときの注意

Posted at

mPDFの1ページ目を横向きにする場合、用紙サイズに -L を付けないと横向きにならない。

例1
$mpdf = new mPDF('ja', 'A4-L');

mPDF関数の第11引数($orientation)で向きを指定することができるのに、それだけでは意味がない様子・・・。

ちなみに、2ページ目以降はAddPage関数の第1引数($orientation)に L(Landscape:横向き)か P(Portrait:縦向き) を指定してあげればOK。

例2
$mpdf->AddPage('L');

小一時間ハマったのでメモ。

4
8
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
8