0
我使用DOMPDF生成動態表。當提交表單時,$ _ POST變量發送到test.php的:DOMPDF - 流後重定向PDF
<?php
session_start();
$theTemplate = 'test.php';
function renderToPDF($templateFile)
{
require_once("./dompdf/dompdf_config.inc.php");
ob_start();
include $templateFile;
$contents = ob_get_clean();
if ($contents !== false)
{
$dompdf = new DOMPDF();
$dompdf->load_html($contents);
$dompdf->render();
$dompdf->stream("Custom_Data.pdf");
}
}
renderToPDF($theTemplate);
?>
tabletest.php與動態值,包括從形式約$ _ POST和從MYSQL一些變量表表。提交表單後,PDF已成功生成,但在下載PDF後有什麼辦法可以重定向到另一頁?我沒有找到類似問題的確鑿答案(Create PDF with DOMPDF and Redirect和How to generate pdf file using dompdf and redirect to another page)...