这是标题代码,在视图中生成pdf,即使我尝试更改可疑代码,仍然会产生相同的输出..
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true,
'UTF-8', false);
// set document information
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetAuthor('Change me');
$pdf->SetTitle('Financial Report');
$pdf->SetSubject('Yearly Customer Finanacial Report');
$pdf->SetKeywords('Purchase, Sale, Order, Payment');
// set default header data
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH,
PDF_HEADER_TITLE.' My PDF', PDF_HEADER_STRING, array(0,64,255),
array(0,64,100));
$pdf->setFooterData(array(0,64,0), array(0,64,128));
答案 0 :(得分:1)
您必须将基本tcpdf类扩展为Your Own并覆盖徽标逻辑。
然后再拨打<div id="statsCharts" class="chartsSection" style="display:none;">
@*Account Age Comparision Trump vs Obama*@
<div class="row">
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading">
<h4>
Account Age Comparision Trump vs Obama
</h4>
</div>
<div id="ageChart" class="dvChart"> </div>
<div class="dvScrollable" style="display:none;">
<table id="tblAgeGroups" class="table table-condensed tablesorter">
<thead>
<tr>
<th>Account Age</th>
<th>Trump</th>
<th>Obama</th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
</div>
</div>
</div>
@*Time Zone Comparision Trump vs Obama*@
<div class="row">
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading">
<h4>
Time Zone Comparision Trump vs Obama
</h4>
</div>
<div id="timeZoneChart" class="dvChart" style="position: relative; width: 960px; height: 800px;"> </div>
<div class="dvScrollable" style="display:none;">
<table id="tblTimeZone" class="table table-condensed tablesorter">
<thead>
<tr>
<th>Time Zone</th>
<th>Trump</th>
<th>Obama</th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
</div>
</div>
</div>
@*Language Comparision Trump vs Obama*@
<div class="row">
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading">
<h4>
Language Comparision Trump vs Obama
</h4>
</div>
<!-- Chart -->
<div id="langGroupChart" class="dvChart"> </div>
</div>
</div>
</div>
。
new YourTcpdf()
可在此处找到完整示例: https://tcpdf.org/examples/example_003/