本文整理汇总了PHP中HTML2PDF::output方法的典型用法代码示例。如果您正苦于以下问题:PHP HTML2PDF::output方法的具体用法?PHP HTML2PDF::output怎么用?PHP HTML2PDF::output使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HTML2PDF
的用法示例。
在下文中一共展示了HTML2PDF::output方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: SUM
}
?>
</tbody>
<tfoot>
<?php
$query2 = $dbh->query("SELECT SUM(hrWork) as `consumed` FROM projwork WHERE eID='{$did}'\n");
$row2 = $query2->fetch();
$h = floor($row2['consumed'] / 60);
$m = $row2['consumed'] % 60;
echo '<tr>
<td></td>';
echo '<td></td>';
echo '<td>Total:</td>';
echo '<td>' . $h . ' hrs and ' . $m . ' minutes</td>
</tr>';
?>
</tfoot>
</table>
</page>
<?php
$content = ob_get_clean();
require_once 'html2pdf.class.php';
$html2pdf = new HTML2PDF('L', 'Legal', 'fr');
$html2pdf->writeHTML($content);
$html2pdf->output('dailylog.pdf');
示例2:
echo '<td>' . $d . '</td>';
echo '<td>' . $row['client'] . '</td>';
if ($status == 'finished') {
echo '<td>' . $status . '</td>';
} else {
if ($status == 'ongoing') {
echo '<td>' . $status . '</td>';
} else {
if ($status == 'cancelled') {
echo '<td><span style="color:red;">' . $status . '</span></td>';
} else {
if ($status == 'hold') {
echo '<td>' . $status . '</td>';
}
}
}
}
echo '</tr>';
}
?>
</tbody>
</table>
</page>
<?php
$content = ob_get_clean();
require_once 'html2pdf.class.php';
$html2pdf = new HTML2PDF('L', 'Legal', 'fr');
$html2pdf->writeHTML($content);
$html2pdf->output('draftsman_individual_reports.pdf');
示例3: catch
$stat_ongoing = $query_ongoing->fetch();
echo '<tr>';
echo '<td>' . $row['name'] . '</td>';
if ($stat_finished['finished'] == 0) {
echo '<td>' . $stat_finished['finished'] . '</td>';
} else {
echo '<td>' . $stat_finished['finished'] . '</td>';
}
if ($stat_ongoing['ongoing'] == 0) {
echo '<td>' . $stat_ongoing['ongoing'] . '</td>';
} else {
echo '<td>' . $stat_ongoing['ongoing'] . '</td>';
}
echo '</tr>';
}
} catch (PDOException $ex) {
echo $ex->getMessage();
}
?>
</tbody>
</table>
</page>
<?php
$content = ob_get_clean();
require_once 'html2pdf.class.php';
$html2pdf = new HTML2PDF('L', 'Legal', 'fr');
$html2pdf->writeHTML($content);
$html2pdf->output('draftsman_reports.pdf');
示例4:
while ($row = $query->fetch()) {
echo "<tr>";
echo "<td>" . $row['class'] . "</td>";
echo "<td>" . $row['name'] . "</td>";
echo "<td>" . $row['tutor'] . "</td>";
echo "<td style='text-align:center;'>" . $row['session'] . "</td>";
if ($row['status'] == 'ongoing') {
echo "<td style='text-align:center;'>" . $row['status'] . "</td>";
} else {
if ($row['status'] == 'dropped') {
echo "<td style='text-align:center;'>" . $row['status'] . "</td>";
} else {
if ($row['status'] == 'finished') {
echo "<td style='text-align:center;'>" . $row['status'] . "</td>";
}
}
}
echo "</tr>";
}
?>
</tbody>
</table>
</page>
<?php
$content = ob_get_clean();
require_once 'html2pdf.class.php';
$html2pdf = new HTML2PDF('L', 'Legal', 'fr');
$html2pdf->writeHTML($content);
$html2pdf->output('class_reports_finished.pdf');
示例5: isset
<td></td>
<td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td>
<td colspan='3'> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td>
<td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td>
<td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td>
<td align='center'> <?php
echo $data2[1];
?>
</td>
</tr>
</table>
</body>
</html>
<?php
$filename = 'penjadwalan-pegawai-tetap, tahun ' . $tahun . ' bulan ' . $bulan . '.pdf';
$conten = ob_get_clean();
try {
$html2pdf = new HTML2PDF('L', 'A4', 'en');
//$html2pdf=new HTML2PDF('P','A4','en',array(10,10,10,10));
$html2pdf->setdefaultfont('times', 12);
$html2pdf->pdf->setdisplaymode('fullpage');
$html2pdf->writeHTML($conten, isset($_GET['vuehtml']));
$html2pdf->output($filename);
} catch (HTML2PDF_exception $e) {
echo $e;
exit;
}
示例6:
echo '<td>' . $row['name'] . '</td>';
if ($countfin['fin'] == 0) {
echo '<td>' . $countfin['fin'] . '</td>';
} else {
echo '<td>' . $countfin['fin'] . '</td>';
}
if ($countongoing['ongoing'] == 0) {
echo '<td>' . $countongoing['ongoing'] . '</td>';
} else {
echo '<td>' . $countongoing['ongoing'] . '</td>';
}
echo '</tr>';
}
?>
</tbody>
</table>
</page>
<?php
$content = ob_get_clean();
require_once 'html2pdf.class.php';
$html2pdf = new HTML2PDF('L', 'Legal', 'fr');
$html2pdf->writeHTML($content);
$html2pdf->output('tutor_reports.pdf');
?>
示例7:
echo '<td><i>' . $h . ' hrs and ' . $m . ' minutes</i></td>';
}
if ($status == 'finished') {
echo '<td>' . $status . '</td>';
} else {
if ($status == 'ongoing') {
echo '<td>' . $status . '</td>';
} else {
if ($status == 'cancelled') {
echo '<td><span style="color:red;">' . $status . '</span></td>';
} else {
if ($status == 'hold') {
echo '<td>' . $status . '</td>';
}
}
}
}
echo '</tr>';
}
?>
</tbody>
</table>
</page>
<?php
$content = ob_get_clean();
require_once 'html2pdf.class.php';
$html2pdf = new HTML2PDF('L', 'Legal', 'fr');
$html2pdf->writeHTML($content);
$html2pdf->output('project_reports.pdf');
示例8: while
$query->setFetchMode(PDO::FETCH_ASSOC);
while ($row = $query->fetch()) {
$attendance = $row['a'];
$d = date("F d, Y", strtotime($row['d']));
echo '<tr>';
echo '<td>' . $d . '</td>';
echo '<td>' . $row['i'] . '</td>';
if ($attendance == 'Present') {
echo '<td>' . $row['a'] . '</td>';
} else {
if ($attendance == 'Absent') {
echo '<td>' . $row['a'] . '</td>';
}
}
echo '</tr>';
}
} catch (PDOException $ex) {
echo $ex->getMessage();
}
?>
</tbody>
</table>
</page>
<?php
$content = ob_get_clean();
require_once 'html2pdf.class.php';
$html2pdf = new HTML2PDF('P', 'Letter', 'fr');
$html2pdf->writeHTML($content);
$html2pdf->output('class_card.pdf');
示例9:
<th>Student Name</th>
<th>Class Name</th>
<!--<th>Days</th>
<th>Time</th>-->
</tr>
</thead>
<tbody>
<?php
while ($row = $query->fetch()) {
echo '<tr>';
echo '<td>' . $row['sid'] . '</td>';
echo '<td>' . $row['sname'] . '</td>';
echo '<td>' . $row['sn'] . '</td>';
//echo '<td>'.$row['schedule'].'</td>';
//echo '<td>'.$row['time'].'</td>';
echo '</tr>';
}
?>
</tbody>
</table>
</page>
<?php
$content = ob_get_clean();
require_once 'html2pdf.class.php';
$html2pdf = new HTML2PDF('L', 'Legal', 'fr');
$html2pdf->writeHTML($content);
$html2pdf->output('classes.pdf');
示例10:
<br>
<br>
<br>
<table align="left">
<tr>
<th WIDTH='300'>-----------------------------------------------------------------------------</th><th WIDTH='400'></th><th WIDTH='300'>-----------------------------------------------------------------------------</th>
</tr>
<tr>
<td align="center">Firma Del Paciente</td>
<td></td>
<td align="center">Firma Del Medico</td>
</tr>
</table>
</page>
<?php
$content = ob_get_clean();
require_once '../html2pdf-4.4.0/html2pdf.class.php';
$pdf = new HTML2PDF('L', 'A4', 'fr', 'UTF-8');
$pdf->writeHTML($content);
$pdf->pdf->IncludeJS('print(TRUE)');
$pdf->output('prueba.pdf');
?>
示例11: catch
echo '</tr>';
}
} catch (PDOException $ex) {
echo $ex->getMessage();
}
?>
</tbody>
<tfoot>
<?php
$query2 = $dbh->query("SELECT SUM(hrWork) as `consumed` FROM projwork WHERE proj_id = '{$pid}'");
$row2 = $query2->fetch();
$h = floor($row2['consumed'] / 60);
$m = $row2['consumed'] % 60;
echo '<tr><td></td><td colspan = 2 style="text-align:right;">Total:</td>';
echo '<td><b>' . $h . ' hrs and ' . $m . ' minutes</b></td><td></td></tr>';
?>
</tfoot>
</table>
</page>
<?php
$content = ob_get_clean();
require_once 'html2pdf.class.php';
$html2pdf = new HTML2PDF('L', 'Legal', 'fr');
$html2pdf->writeHTML($content);
$html2pdf->output('projlog.pdf');
示例12:
?>
<table>
<thead>
<tr>
<th>Project Title</th>
<th>Owner</th>
<th>Skill</th>
</tr>
</thead>
<tbody>
<?php
while ($row = $query->fetch()) {
echo '<tr>';
echo '<td>' . $row['pn'] . '</td>';
echo '<td>' . $row['cn'] . '</td>';
echo '<td>' . $row['sn'] . '</td>';
echo '</tr>';
}
?>
</tbody>
</table>
</page>
<?php
$content = ob_get_clean();
require_once 'html2pdf.class.php';
$html2pdf = new HTML2PDF('L', 'Legal', 'fr');
$html2pdf->writeHTML($content);
$html2pdf->output('accomplished.pdf');
示例13: generatePdf
public function generatePdf(PdfEvent $event)
{
$html2pdf = new \HTML2PDF($event->getOrientation(), $event->getFormat(), $event->getLang(), $event->getUnicode(), $event->getEncoding(), $event->getMarges());
$html2pdf->pdf->SetDisplayMode('real');
$html2pdf->writeHTML($event->getContent());
$event->setPdf($html2pdf->output(null, 'S'));
}