-4
如何顯示pdf並使用php或html打印?我想從phpMyAdmin的使用數據來做出一個PDF數據如何顯示pdf或打印pdf
如何顯示pdf並使用php或html打印?我想從phpMyAdmin的使用數據來做出一個PDF數據如何顯示pdf或打印pdf
我會說使用DOMPDF它讓HTML文件和PDF打印它,你可以選擇枯萎用戶查看或下載它,你可以把html文件中的php變量。 github上鍊路 https://github.com/dompdf/dompdf
從文檔示例
// reference the Dompdf namespace
use Dompdf\Dompdf;
// instantiate and use the dompdf class
$dompdf = new Dompdf();
$dompdf->loadHtml('hello world');
// (Optional) Setup the paper size and orientation
$dompdf->setPaper('A4', 'landscape');
// Render the HTML as PDF
$dompdf->render();
// Output the generated PDF to Browser
$dompdf->stream();