Welcome Guest, Not a member yet? Register   Sign In
Recommendations for PDF Creation Libraries?
#1

Hi everyone,

I want to give users the option in my Web app to convert Web site content to a PDF to print or download.

I'm looking for recommendations for a PDF library which works well with ci, doesn't hog too much space and which has at least a decent chance of being supported for a while!

I tried MPDF and after an hour couldn't get it to work. I think some of the tutorials are out of date. If that is in fact the best one I'll spend another hour or two trying to make it work, but I'm thinking maybe there's a better option?

Thank you!
Reply
#2

Whenever I need to generate a PDF I use DomPDF.

https://github.com/dompdf/dompdf
Reply
#3

It really depends on your requirements as there are several PDF libraries. A recent project of mine ended up going with mPDF because of the language support.
Reply
#4

As mentioned already, DOMPdf is pretty good and very portable since it's all in PHP. I've also had good luck with wkhtmltopdf which is a bit faster since it's a lower level command. Also, PDFtk is nice, and simple to install on a Linux server, when used in combo with [https://github.com/mikehaertl/php-pdftk]this PHP package[/url] becomes pretty simple to use.
Reply
#5

I use FPDF before and it works good for me Smile
God Bless CI Contributors Smile
Reply
#6

I felt the need to resurrect this old thread because I finally discovered wkhtmltopdf. I had been using dompdf for years, and dompdf is just almost impossible to make a layout that is complex. wkhtmltopdf makes dompdf seem like garbage. I created a few documents with it this morning, and didn't run into any rendering bugs or errors.
Reply
#7

(12-21-2017, 09:15 PM)skunkbad Wrote: I felt the need to resurrect this old thread because I finally discovered wkhtmltopdf. I had been using dompdf for years, and dompdf is just almost impossible to make a layout that is complex. wkhtmltopdf makes dompdf seem like garbage. I created a few documents with it this morning, and didn't run into any rendering bugs or errors.

how do you integrate wkhtmltopdf in codeigniter?
thank you.
Reply
#8

I use php-pdftk to integrate with any PHP application.
Reply
#9

(This post was last modified: 12-20-2018, 01:30 PM by php_rocs.)

@cyclist,

I'm a huge fan of TCPDF ( https://github.com/bcit-ci/CodeIgniter/w...ntegration ). It's been great for me.
Reply
#10

(12-20-2018, 12:08 PM)burebista Wrote:
(12-21-2017, 09:15 PM)skunkbad Wrote: I felt the need to resurrect this old thread because I finally discovered wkhtmltopdf. I had been using dompdf for years, and dompdf is just almost impossible to make a layout that is complex. wkhtmltopdf makes dompdf seem like garbage. I created a few documents with it this morning, and didn't run into any rendering bugs or errors.

how do you integrate wkhtmltopdf in codeigniter?
thank you.

See: https://github.com/mikehaertl/phpwkhtmltopdf
Reply




Theme © iAndrew 2016 - Forum software by © MyBB