Skip to content
Loading
generate html to pdf
+1
  • Rajeesh Menoth
    Hi,
     
    Please check the following online service mentioned in SO.
    • PDFShift
    • Restpack
    • PDF Layer
    • DocRaptor
    • HTMLPDFAPI
    • HTML to PDF Rocket
    Reference :
     
    https://stackoverflow.com/questions/391005/convert-html-css-to-pdf-with-php
     
    Mark as answer, if that helped you 
    +1
  • follow below link
     
    https://www.c-sharpcorner.com/blogs/how-to-convert-html-with-css-to-pdf-using-javascript
     
     or 
    try this code
    1. <html xmlns="http://www.w3.org/1999/xhtml">  
    2. <head>  
    3.     <title>title>  
    4.     <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js">script>  
    5.     <script type="text/javascript">  
    6.         $("#btnPrint").live("click", function () {  
    7.             var divContents = $("#dvContainer").html();  
    8.             var printWindow = window.open('', '', 'height=400,width=800');  
    9.             printWindow.document.write('<html><head><title>DIV Contentstitle>');  
    10.             printWindow.document.write('head><body >');  
    11.             printWindow.document.write(divContents);  
    12.             printWindow.document.write('body>html>');  
    13.             printWindow.document.close();  
    14.             printWindow.print();  
    15.         });  
    16.     script>  
    17. head>  
    18. <body>  
    19.     <form id="form1">  
    20.     <div id="dvContainer">  
    21.         This content needs to be printed.  
    22.     div>  
    23.     <input type="button" value="Print Div Contents" id="btnPrint" />  
    24.     form>  
    25. body>  
    26. html>  
     
    +1
  • Madan Shekar
    https://www.sitepoint.com/convert-html-to-pdf-with-dompdf/
    +1
  • Sanwar Ranwa
    Hello Krishna
     
    Please check these Links
     
    https://pdfcrowd.com/blog/convert-html-to-pdf-in-php/ 
     
    https://www.youtube.com/watch?v=UflTcEFuEyU 
     
    https://www.html2pdfrocket.com/convert-php-to-pdf
     
    https://www.pdfonline.com/php-html-to-pdf/
    +1