我正在使用html2pdf类从html页面生成pdf文件.我想在每个页面上放置列标题.但我没有得到概念如何做到这一点.这是我的代码:
<?php
function linewrap($string, $width, $break, $cut) {
$array = explode("\n", $string);
$string = "";
foreach($array as $key => $val) {
$string .= wordwrap($val, $width, $break, $cut);
$string .= "\n";
}
return $string;
}
if(isset($_POST['download'])){
//connect to the database
require_once('../../connect.php');
$status=$_POST['status'];
//retrieve the specific rows by given status
$query="SELECT *
FROM `incident_status`
WHERE status='".$status."'";
//execute the query
$run=mysql_query($query);
$i=1;
//content to be downloaded
$content='<page backtop="2mm" backbottom="2mm" backleft="2mm" backright="2mm" style="font-size:6pt;bordercolor:#000000;">';
$content .='<p style="text-align:center;"><b>Incident Status Report</b> of the Pending cases </p>';
$content.='<table …Run Code Online (Sandbox Code Playgroud)