MPDF Library PDF Converter


Folder Structure:

index.php

<?php require_once __DIR__ . '/vendor/autoload.php'; ?>
<!DOCTYPE html>
<html>
<head>
    <title>mPDF Demo Application.</title>
</head>
<body>

    <?php 
    $mpdf = new mPDF();
    $html = 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
    tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
    quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
    consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
    cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
    proident, sunt in culpa qui officia deserunt mollit anim id est laborum.';
    $mpdf->WriteHTML($html);
    $mpdf->Output();
    ?>
</body>

</html>

Output:


Share on Google Plus

About Ram Pukar

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Blogger Comment

0 comments:

Post a Comment