Generatin pdf in PHP using FPDF Library. FPDF Download Link http://fpdf.org/ Function Covered : 1. AddPage 2.SetFont 3.Cell 4.Write 5.

source

42 Comments

  1. Hi, I m work on 1 web application in that user write content on text editor, upload images and click on submit , after click the edited part converted into pdf. Can u plz help me

  2. Awesome tutorial. Thank you so much for explaining this so clearly. I was searching for this, and got to see your video just at the right time. Thank you so much.

  3. Read the documentation people, there is WriteHTML() function.
    You can place whatever text you want inside a variable (let's say it's PHP, could be any language), $myText="<br />My HTML text.<br /><hr />".
    Then, that variable can be echoed out with $pdf->WriteHTML($myText);

    it's that easy. Doesn't have as much capabilities as other PDF converter, not free :), but it will do the job if you think a little bit. ;)

  4. how to get this to output whatever is already on the page, so that I don't have to put in the content inside $pdf ->cell (0,10, "content…")

  5. What if i wanted to pass an entire php page as one element to save at the host and send to user so he could download the file ??

    Or if i passed a HTML page contains a php scripts in between ? ?

  6. how to get this to output whatever is already on the page, so that I don't have to put in the content inside $pdf ->cell (0,10, "content…")

  7. I already started my learning curve in TCPDF, this FPDF seems pretty similar, do you think the two methods are pretty much the same? Should I switch to FPDF? 

    Granted, TCPDF seems more advanced/complicated.

  8. Thanks for this, man! I'm just starting to learn PHP and couldn't find a good tutorial for creating PDF's anywhere. This was a perfect beginner course and the FPDF tutorials should make a lot more sense after this. 

Leave A Reply

Please enter your comment!
Please enter your name here