https://codetones.com
  • How To Remove UnTab Extension on Web Browser? >> UnTabs extension could be a malicious browser helper which specifically... << Read More >>
  • How to Speed Up Your WordPress | Top Tips to Optimize Your WordPress Website >> WordPress is the world's fastest CMS (Content Management System) name... << Read More >>
  • Top 10 Ways That Visitors Will Increase On Your Website >> The quality of these good quality text and images is... << Read More >>
  • How to create Menu and Submenu with HTML and CSS? >> Menu and submenu is the integrated part of a website.... << Read More >>
  • 12 Tips And Trick For Computer You must know >> The computer made our life easier to a great extent.... << Read More >>
  • Programming vs. Software Engineering >> An eternal question from fresher joining the parade of IT... << Read More >>
  • What is the Domain Authority or the Page Authority? How do I check the Domain Authority account? >> Google's rating is ranked 200 by checking whether to show... << Read More >>
Facebook Twitter Google Plus Linkedin RSS Youtube

Codetones

Only for Creative mind

  • Home
     
  • PC Helpers
     
  • Technews
     
  • Tutorials
     
    • HTML
    • CSS
    • PHP
    • WordPress
  • Code FAQ
     
  • Users
     
    • Login
    • Create An Account
  • About Us
     
  • Contact Us
     
Home Page > Tutorials > PHP > How to Convert HTML and CSS to PDF with PHP?

How to Convert HTML and CSS to PDF with PHP?

author Author: Calixto

icon-calendar Date: 3 years ago

view Views: 1434

icon-comment Comments: 0

Share on

Facebook Twitter Google Plus Linkedin
Convert HTML and CSS to PDF

Website data pdf is important to make your document.Mpdf You can make your data pdf file with the help of mpdf. Text and image with css style can be shown with the help of mpdf. There are others php class to make pdf. But mPDF is easy to use. mPDF generates PDF file from UTF-8 encoded HTML. mPDF easy to intricate with php framework Laravel, wordpress, codeigniter, raw php etc. You can easy download mpdf on google.

codetones-pdf

<?php
include('mpdf.php'); // mpdf file pathe in the project
$mpdf=new mPDF();


$html="<table>
<tr>
<td>Name: </td>
<td> John Doe</td>
</tr>
<tr>
<td>Email:</td>
<td>pdf@gmail.com</td>
</tr>
<tr>
<td>About:</td>
<td>
<p style='color:blue;'>
<strong>Codetones</strong> is an educational website. Here you will find different type of solution related to Web Development. Codetones provides you beginner to advanced level Tutorials.Latest Programming Tech news with informative data help you to solve web development base problem while programming.

Step by step we will provide you the solution of the common and advanced code errors when coding. We face a lot of challenge when coding and it's hard enough to get the solution. Here we come to show you the easiest way to solve.
</p>
</td>
</tr>
</table>";

$mpdf->WriteHTML($html);
$mpdf->Output();   exit;
 ?>

If you have any query comment below. We will post advance article about making pdf.

Related Posts

Interview Question In PHP

Interview Question In PHP

Top PHP & Mysql Questions

Top PHP & Mysql Questions

Top 8 PHP Learning Books

Top 8 PHP Learning Books

.htaccess

.htaccess

Leave a Reply

Codetones Adblocker Notice

AdBlocker Detected

Please disable your adblocker
This site is supported by the advertisement
Please disable your adblocker to support us !

Online Tools

  • Image Convertor
  • File Convertor
  • Watermark On Image
  • Hash Password
  • Secure Password Generator
  • Color to Black & White Image
  • Black & White to Color Image

Popular Posts

Top 8 Professional HTML5 Learning Books For Beginner to Advanced
Top 8 Professional HTML5 Learning Books For Beginner to Advanced
.htaccess Web Developing :: Basic to Advanced
.htaccess Web Developing :: Basic to Advanced
Download A Huge Assortment of Stock Images Without Copyright Issue
Download A Huge Assortment of Stock Images Without Copyright Issue
How to reset forgotten windows password?
How to reset forgotten windows password?
What is the Domain Authority or the Page Authority? How do I check the Domain Authority account?
What is the Domain Authority or the Page Authority? How do I check ...
Large-Skycraper

Categories

  • HTML
  • CSS
  • PHP
  • WordPress

Join Codetones

Facebook Twitter Google Plus Linkedin RSS Youtube

Codetones

Codetones is the Web Solution Base Website. Here You Can Find Beginner to Advanced Level Tutorials.

Support

  • About Us
  • Contact Us
  • Codetones Mobile Apps

Accessibility

  • Terms of Use
  • Privacy Policy
  • Site Map
© Copyright 2019 Codetones. All Right Reserved

Powered by Codetones