use pdf class in php and mysql

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • manisankar
    New Member
    • Sep 2014
    • 3

    use pdf class in php and mysql

    Hello sir,
    i am using mysql+php+javas cript
    my problem is i am not able to convert the webpage into pdf format. For example, suppose I have displayed employee details from database, now I want to make a button so that when we click on this button it will convert the whole webpage into pdf format.
    So kindly provide me complete information and source code from bigining steps.
    Last edited by Stewart Ross; Oct 11 '14, 06:00 PM. Reason: Removed incorrect use of code tags
  • amnos
    New Member
    • Oct 2014
    • 3

    #2
    there are more php libraries available to convert html to pdf like html2pdf, mpdf, tcpdf and fpdf,etc. you can check those libraries.

    for mpdf you can use the code like below

    Code:
    include("../mpdf.php");
    $mpdf=new mPDF();
    $mpdf->WriteHTML($html);
    $mpdf->Output();
    exit;
    check this tutorial for more info

    Comment

    • Exequiel
      Contributor
      • Jul 2012
      • 288

      #3
      you can download this package for you to convert html to pdf, , there are lots of examples in this package, its easy to manege and configure. . http://html2pdf.fr/en/default

      Comment

      Working...