What are the range of options available for implementing a "Download as PDF" feature on a PHP-based web page? Do I need to implement a server-side PHP-based PDF generator using a third party library, or are external web services available that can accomplish this for me?
Use TCPDF over fpdf, because:
By way of trivia, TCPDF was based upon fpdf many years ago, but was almost entirely remastered since. It still comes with source code and is highly adviseable.
Example usage is another question, and a practive of extending the base class, overriding methods, etc. Don't worry, the download contains lots of samples (10 or more projects) from simple to advanced. I am experienced in PHP, but even taking that into account, some years back, I was able to ship our first prototype of localized pdf reports in all of one day.
class MyPDF extends TCPDF {
// meaningful code
}
By the way, there's even a TCPDF
tag here on StackOverflow :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With