<?php require_once('connect/connect.php'); $mysql=$con->query("SELECT * FROM przyjecie_towar"); echo<<<label <center> <table cellspacing="0" border=1 bordercolor="black" width="100%" height="100%"> <td width="45%"> <table cellspacing="0" border=1 bordercolor="black" width="100%" height="100%"> <td align="center" valign="bottom" >(pieczęć)</td> <td align="center" valign="bottom">(dostawca)</td> </table> </td> <td> <table cellspacing="0" border=1 bordercolor="black" width="100%" height="100%"> <td style="background-color:silver"> <table cellspacing="0" width="100%" height="100%"> <tr ><th align="center" valign="bottom" > PZ </th></tr> <tr><td align="center" valign="bottom">przyjęcie </td></tr> <td align="center" valign="center">zewnętrzne</td> </td> </table> </table> </td> <td> <table cellspacing="0" border=1 bordercolor="black"width="100%" height="100%"> <tr><th style="background-color:silver">Nr bieżący</th> <th style="background-color:silver">Egz.</th></tr> <td> </td> <td> </td> <tr><th style="background-color:silver">Nr magazynowy</th> <th style="background-color:silver">Data wystawienia</th></tr> <td> </td> <td> </td> </table> </td> <tr> <td colspan="3" style="padding: 0 px"> <table cellspacing="0" border=1 bordercolor="black" width="100%" height="100%"> <tr style="background-color:silver"><th>Zamówienie</th> <th>Data zamówienia</th> <th>Data wysyłki</th> <th>Data otrzymania</th> <th>Numer faktury</th></tr> <td><center> </center></td> <td><center> </center></td> <td><center> </center></td> <td><center> </center></td> <td><center> </center></td> </table> </td> </tr> <tr> <td colspan="3" style="padding: 0 px"> <table cellspacing="0" border=1 bordercolor="black" width="100%" height="100%"> <tr style="background-color:silver"><th width="3%">L.p.</th> <th width="10%">ID</th> <th width="20%">Nazwa</th> <th>Cena jedn.</th> <th><table cellspacing="0" border=1 bordercolor="black" frame="void" width="100%" height="100%"> <tr><th colspan="3">Ilość</th></tr> <th width="33%">Otrzymane</th><th width="33%">Zamówione</th><th width="33%">Przyjęte</th> </table> </th> <th width="15%">Wartość przyjętego towaru(zł)</th> <th>Zapas</th> </tr> label; while ($r = mysqli_fetch_assoc($mysql)) { echo '<td cellpading="0"><table cellspacing="0" border=1 bordercolor="black" frame="void" width="100%" height="100%"> <td width="33%"><center>'.$r['ot'].'</center></td><td width="33%"><center>'.$r['zam'].'</center></td><td width="33%"><center>'.$r['nastan'].'</center></td> </table></td>'; } echo<<<label </table> </tr> <tr> <td colspan="3" style="padding: 0 px"> <table cellspacing="0" border=1 bordercolor="black" width="100%" height="100%"> <th style="background-color:silver">Wymienione:</th> </table> </td> </tr> <tr> <td colspan="3" style="padding: 0 px"> <table cellspacing="0" border=1 bordercolor="black" width="100%" height="100%"> <tr style="background-color:silver"><th>Dostarczył</th> <th>Data</th> <th>Przyjął</th> <th>Ewidencja ilościowo-wartościowa</th> </tr> <tr> <td><center> </center></td> <td><center> </center></td> <td><center> </center></td> <td><center> </center></td> </table> </tr> </td> </tr> </table> label; ?>
i chcę ją zapisać do pliku pdf to, co dostaje przeglądarka.
Próbowałem już to zrobić za pomocą dompdf, ale "wypluwa" plik .pdf, którego nie da się otworzyć.