<?php use Spipu\html2pdf\Html2Pdf; #use Spipu\html2pdf\Exception\Html2PdfException; #use Spipu\html2pdf\Exception\ExceptionFormatter; require_once("html2pdf/html2pdf-master/src/Html2Pdf.php"); $html2pdf = new Html2Pdf('P','A4','de',true,"UTF-8",array(10, 10, 10, 16)); $buffer = '<page backtop="7mm" backbottom="10mm" style="font-size: 11pt">'; $buffer .= "<style type='text/css'> td { border:0.3px solid black; } .td_foot { border: none; } body { font-size: 12px; } table { font-size: 12px; } td{padding: 3px;} p { font-size: 12px; } table.page_footer {width: 100%; border: none; padding: 20mm} .fcol{color: #0C25BF;} </style>"; $buffer .= "<page_footer> <table width='110%' cellspacing='0' > <tr> <td class='td_foot' width='680' style='text-align: center;'>Seite [[page_cu]]/[[page_nb]]</td> </tr> </table> </page_footer>"; $buffer.="<h1>Alexander Schwarz</h1> <table cellspacing='0' cellpadding='0' border='0.3'> <tr> <td width='300'> Name </td> <td width='130'> ID </td> <td width='100'> TAN </td> <td width='100'> Link </td> </tr> </table> </page> "; $html2pdf->writeHTML($buffer); $html2pdf->output('test.pdf'); ?>