| Server IP : 127.0.0.1 / Your IP : 192.168.99.1 Web Server : Apache/2.4.35 (Win64) OpenSSL/1.1.1b mod_fcgid/2.3.9 System : Windows NT WIN-JEJMB9EN0L0 10.0 build 14393 (Windows Server 2016) AMD64 User : Administrator ( 0) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /laragon3/www/antrian/petugas/assets/html2pdf_v4.03/examples/ |
Upload File : |
<?php
/**
* HTML2PDF Librairy - example
*
* HTML => PDF convertor
* distributed under the LGPL License
*
* @author Laurent MINGUET <webmaster@html2pdf.fr>
*
* isset($_GET['vuehtml']) is not mandatory
* it allow to display the result in the HTML format
*/
// get the HTML
ob_start();
?>
<style type="text/css">
<!--
.div { background: #CCDDCC; color: #002200; text-align: center; width: 70mm; height: 20mm; margin: 2mm; }
.div1 { border: solid 2mm black; border-radius: 5mm; -moz-border-radius: 5mm; }
.div2 { border: solid 2mm black; border-radius: 3mm 10mm 0mm 3mm; -moz-border-radius: 3mm 10mm 0mm 3mm; }
.div3 { border: solid 2mm black; border-radius: 10mm / 7mm; -moz-border-radius: 10mm / 7mm; }
.div4 { border: solid 6mm black; border-radius: 5mm / 10mm; -moz-border-radius: 5mm / 10mm; }
.div5 { border: solid 5mm black; border-top: none; border-bottom: none; border-radius: 5mm; -moz-border-radius: 5mm; }
.div6 { border: solid 5mm black; border-left: none; border-right: none; border-radius: 5mm; -moz-border-radius: 5mm; }
.div7 { border: solid 5mm black; border-left: none; border-top: none; border-radius: 5mm; -moz-border-radius: 5mm; }
.div8 { border-radius: 8mm; -moz-border-radius: 8mm; border-left: solid 2mm #660000; border-top: solid 1mm #006600; border-right: solid 2mm #000066; border-bottom: solid 4mm #004444;}
-->
</style>
<page>
<div class="div div1">Exemple de div</div>
<div class="div div2">Exemple de div</div>
<div class="div div3">Exemple de div</div>
<div class="div div4">Exemple de div</div>
<div class="div div5">Exemple de div</div>
<div class="div div6">Exemple de div</div>
<div class="div div7">Exemple de div</div>
<div class="div div8">Exemple de div</div>
</page>
<?php
$content = ob_get_clean();
// convert to PDF
require_once(dirname(__FILE__).'/../html2pdf.class.php');
try
{
$html2pdf = new HTML2PDF('P', 'A4', 'fr');
$html2pdf->writeHTML($content, isset($_GET['vuehtml']));
$html2pdf->Output('radius.pdf');
}
catch(HTML2PDF_exception $e) {
echo $e;
exit;
}