Why is Moodle 195 using fpdf 1.53 and not 1.6

Why is Moodle 195 using fpdf 1.53 and not 1.6

by Ger Tielemans -
Number of replies: 5
Why is Moodle 195 using fpdf 1.53 and not 1.6
Average of ratings: -
In reply to Ger Tielemans

Re: Why is Moodle 195 using fpdf 1.53 and not 1.6

by Ger Tielemans -
I see, tcpdf, so can I remove fpdf?
In reply to Ger Tielemans

Re: Why is Moodle 195 using fpdf 1.53 and not 1.6

by Dan Marsden -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators
AFAIK nothing in Core actually uses those libs in 1.9 - so if you don't have any 3rd party modules using them, you could potentially remove them both!

there are a couple of bugs in the tracker about this, but fpdf is being removed from core in 2.0, and I think Chardelle has converted the Certificate module for 2.0 to only use tcpdf.

hope that helps!

Average of ratings: Useful (1)
In reply to Dan Marsden

Re: Why is Moodle 195 using fpdf 1.53 and not 1.6

by Ger Tielemans -
Ok, thanks, so where can I find info to convert fpdf use into tcpdf?
In reply to Ger Tielemans

Re: Why is Moodle 195 using fpdf 1.53 and not 1.6

by David Mudrák -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators
Hi Ger,

as Dan mentions, fpdf has been removed - see MDL-15055 and the linked issues for more info. In your code, you should use the Moodle PDF wrapper library lib/pdflib.php, however. TCPDF was written so it copies the API of fpdf, the upgrade should be relatively easy.

d.
Average of ratings: Useful (1)
In reply to David Mudrák

Re: Why is Moodle 195 using fpdf 1.53 and not 1.6

by Ger Tielemans -
Ok, thanks for the pdflib.php.

I get some output. I changed the extend class part I had for header and footer in fpdf into:

class MYPDF extends TCPDF { ..}

Now the body-text looks OK, only the header and footer bar I created in fpdf style collapsed.