Forum Moderators: coopster

Message Too Old, No Replies

TCPDF Documentation?

documentation or examples how to use TCPDF

         

SeanF

12:28 pm on Jul 24, 2019 (gmt 0)

5+ Year Member Top Contributors Of The Month



Hi:

I have a CRM which I developed using MySQL / PHP and some javaScript on the client-side. I want to be able to output some pages in pdf rather than HTML (PHP) and have found that TCPDF works pretty well.

The problem is there does not seem to be any documentation. So, little things like aligning text (centering on page) is not working as I expect.

Does anyone know if there is any good documentation or tutorials for TCPDF?

Alternatively, what is the simplest way to output a pdf document from PHP to a browser?

Thanks

Dimitri

7:41 am on Jul 25, 2019 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member Top Contributors Of The Month



It might be easier to use this :

[pecl.php.net...]

With the documentation here:

[php.net...]

coopster

2:25 pm on Aug 6, 2019 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Hey SeanF,

Welcome to WebmasterWorld. I have used many different PDF rendering packages over the years and I'll agree with Dimitri, there are many easier options nowadays. I used FPDF originally which is comparable to packages like TCPDF. It takes a lot more thought, planning and programming than some of the alternatives today. My preference is to create the HTML and then let your PDF rendering engine of choice do the conversion. I noticed with a quick search that there is an open source html2pdf rendering package based on TCPDF, if you choose to try this route:

[github.com...]

Dimitri

5:23 pm on Aug 7, 2019 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member Top Contributors Of The Month



I'll agree with Dimitri

Thank you :) ... so now you have your third vote.

SeanF

9:53 pm on Aug 7, 2019 (gmt 0)

5+ Year Member Top Contributors Of The Month



Thanks, all... I will look into that.

tangor

11:04 pm on Aug 7, 2019 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I generally do all my layout/formatting in the one aspect I have 100% control: the html. All I ever want a PDF conversion do is faithfully replicate that layout. So ... I look for the simplest solution to a single problem rather than look at solutions with more bells and whistles than I really need.

That said, I don't do much in the "on the fly" pdf conversion side ... generally do those off line because my content is largely very static. And in that regard this isn't a real solution, other than the initial statement: control what you can and keep the rest of the process as simple as possible.