<html>
<?php
require_once('fpdf.php');
require_once('WriteHTML.php');
//include 'yourpage.html';
$buffer = file_get_contents("yourpage.html");
$pdf=new PDF_HTML();
$pdf->AliasNbPages();
$pdf->SetAutoPageBreak(true, 15);
$pdf->AddPage();
$pdf->SetFont('Arial','B',9);
$pdf->WriteHTML($buffer);
?>
<script type="text/javascript" src="canvasjs/canvasjs.min.js"></script>
<script type="text/javascript" src="canvasjs/jquery.canvasjs.min.js"></script>
<script type="text/javascript" src="canvasjs/html2canvas.js"></script>
</head>
<script>
function myFunction()
{
window.print();
}
</script>
<script type="text/javascript">
    $(document).ready(function () {

        $('#save').on("click", function () {
        alert("hi");
            captureAndDisplay();
        });

    function captureAndDisplay() {
        $('body').html2canvas({
            onrendered: function (canvas) {
                var myImage = canvas.toDataURL("image/png");
                window.open(myImage);
            }
        });
    }
    });
</script>
</html>
	