General developer forum

Creating or generating a PDF

Re: Creating or generating a PDF
Core developersParticularly helpful MoodlersPlugin developers

I'm not sure what you mean by 'easier' (compared to what?), but the easiest way I know is:

$pdf = new pdf();
$pdf->WriteHTML('<p>This is an example</p>');
$pdf->Output('mypdf.pdf', 'D');

There is a lot more documentation at:

(Above written off the top of my head, without testing).

Average of ratings: -