【发布时间】:2014-07-10 07:19:14
【问题描述】:
我想将 pdf 重定向到 php .. 插入重定向到 bill_pdf.php 后。有pdf文件正在下载。下载后我想重定向回 view.php 。
谢谢
<?php
require('../includes/db.php');
require_once('../html2pdf/html2pdf.class.php');
$content = "
<html>
<head>
<title>Bill Generation</title>
<style>
table,th,td
{
border:1px solid black;
border-collapse:collapse;
}
</style>
</head>
<body style='margin:0 auto;width:1000px'>
<div style='width:730px;padding-left:15px'><hr/></div>
<p style='text-align: center; font-size: 16px;'> RECEIPT</p>
<div style='width:730px;padding-left:15px'><hr/></div>
<p style='float:left;margin-left: 30px;font-size: 16px;'>Date: 2/3/14</p>
<p style='font-size: 16px;margin-left:480px;margin-top:-35px'>Receipt No: 1234 </p>
<p style='margin-left: 550px; margin-top: 40px; font-size: 16px;'>Authorized Signatory</p></body>
</html>";
ob_clean();
$html2pdf = new HTML2PDF('P','A4','fr');
$html2pdf->WriteHTML($content);
$r=$html2pdf->Output('Bill.pdf','D');
?>
【问题讨论】: