Skip to content Skip to sidebar Skip to footer

Webpage Convert To Pdf Button

I have a website now and I want to create a button on it to convert this page to PDF. Is there any code to make this happen? I cannot find it on the internet. So I want to have a b

Solution 1:

I use wkhtmltopdf - works very well - http://code.google.com/p/wkhtmltopdf/ there is a PHP wrapper

Updated based on comments below on usage :

How to use the integration class:

require_once('wkhtmltopdf/wkhtmltopdf.php');     // Ensure this path is correct !$html = file_get_contents("http://www.google.com");
$pdf = new WKPDF();
$pdf->set_html($html);
$pdf->render();
$pdf->output(WKPDF::$PDF_EMBEDDED,'sample.pdf');

Solution 2:

Use FPDF. It's a well-respected PDF-generating library for PHP that is written in pure PHP (so installing it should be dead simple for you).

Solution 3:

Post a Comment for "Webpage Convert To Pdf Button"