Is there a solution for pdf template in PHP? -


I need to generate the quote in PDF format with PHP, with a dynamic value derived from a template and database.

Is it viable?

UPDATE: I see that recently people were picked up for most applications Better options

Yes, + worked for me

Basically, you first create your own PDF template, then load it into a new FPDI object and draw "Over" on the template Use the FPDF function to work like photoshop layers work.

$ pdf = new FPDI (); $ Pdf- & gt; SetSourceFile ('template.pdf'); $ Tpl = $ pdf- & gt; Import page (1); $ Pdf- & gt; AddPage (); $ Pdf- & gt; UseTemplate ($ TPL); & Lt; - The template has been imported $ pdf- & gt; Setxy (10, 20); $ Pdf- & gt; Write (100, "Hi there"); & Lt; - Template $ pdf- & gt; Write or draw something on the output ('newpdf.pdf', 'D'); & Lt; - Prepare, save or output your PDF

Comments