Search code examples
phpfpdf

Setting Custom Paper Size in FPDF


here is the code

$pdf = new PDF('P','mm',array(210,148.5));

we are trying to achieve A4 half size

but not getting desired result


Solution

  • Refer to this documentation.

    It should be FPDF instead of PDF?

    Try this out:

    $pdf = new FPDF('P','mm',array(210,148.5));