本文整理汇总了PHP中HTML2FPDF::DisplayPreferences方法的典型用法代码示例。如果您正苦于以下问题:PHP HTML2FPDF::DisplayPreferences方法的具体用法?PHP HTML2FPDF::DisplayPreferences怎么用?PHP HTML2FPDF::DisplayPreferences使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HTML2FPDF
的用法示例。
在下文中一共展示了HTML2FPDF::DisplayPreferences方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Create
function Create()
{
$this->content = utf8_decode($this->_ParseHTML($this->content));
$pdf = new HTML2FPDF();
$pdf->ShowNOIMG_GIF();
$pdf->DisplayPreferences('HideWindowUI');
$pdf->AddPage();
$pdf->WriteHTML($this->content);
$pdf->Output(\Cx\Lib\FileSystem\FileSystem::replaceCharacters($this->title));
}
示例2: header
}
$plink = '<a href="' . $PHP_SELF . "?id=" . $_SESSION['id_ff_anp'][$i] . "&pga=" . $cPga . '">' . $cPgan . '</a>' . "\n";
echo " " . $plink;
}
echo " >>";
}
}
//pdf
?>
</td>
</tr>
</table>
</body>
</html>
<?php
if ($_GET[pdf] == 'ok') {
$htmlbuffer = ob_get_contents();
ob_end_clean();
header("Content-type: application/pdf");
$pdf = new HTML2FPDF();
$pdf->ubic_css = "../../style.css";
//agreg mio
$pdf->DisplayPreferences('HideWindowUI');
//$pdf->SetAutoPageBreak(false);
//$pdf->usetableheader=true; $pdf->Header('Objetivos Estrategicos'); //titulo
$pdf->AddPage();
//$pdf->SetFont('Arial','',12);
// $pdf->setBasePath("../../../");
$pdf->WriteHTML($htmlbuffer);
$pdf->Output('ficha_subactividad.pdf', 'D');
}
示例3: DisplayPDF
function DisplayPDF($smarty, $invoicetype, $template)
{
require_once 'pdf-invoices/html2pdf/html2fpdf.php';
$pdf = new HTML2FPDF();
$pdf->DisplayPreferences('HideWindowUI');
$pdf->AddPage();
$pdf->WriteHTML($this->GetHTML($smarty, $invoicetype, $template));
// TODO: find a better name
return $pdf->Output('Invoice_' . date("d/m/Y-H:i") . '.pdf', 'I');
}
示例4: _print_pdf
function _print_pdf($file, $data)
{
require_once 'h2p/html2fpdf.php';
// agar dapat menggunakan fungsi-fungsi html2pdf
ob_start();
// memulai buffer
error_reporting(1);
// turn off warning for deprecated functions
$pdf = new HTML2FPDF();
// membuat objek HTML2PDF
$pdf->DisplayPreferences('Fullscreen');
$html = $data;
// mengambil data dengan format html, dan disimpan di variabel
ob_end_clean();
// mengakhiri buffer dan tidak menampilkan data dalam format html
$pdf->addPage();
// menambah halaman di file pdf
$pdf->WriteHTML($html);
// menuliskan data dengan format html ke file pdf
return $pdf->Output($file, 'D');
}
示例5: EmailInvoice
//.........这里部分代码省略.........
display_2bill($prvat);
?>
</b></font></td>
</tr>
<tr>
<td><img src="<?php
echo Images_Path;
?>
/spacer.jpg" align="middle" height="30px"></td>
</tr>
<tr bgcolor="#CCCCCC" >
<td align="right" width="100%"><font color="#003399"><b><?php
echo gettext("Grand Total");
?>
= <?php
echo display_2bill($totalcost + $prvat);
?>
</b></font></td>
</tr>
<tr>
<td><img src="<?php
echo Images_Path;
?>
/spacer.jpg" align="middle" height="30px"></td>
</tr>
</table>
<table cellspacing="0" cellpadding="2" width="80%" align="center">
<tr>
<td colspan="3"> </td>
</tr>
<tr>
<td align="left">Status : <?php
if ($info_customer[0][12] == 't') {
?>
<img src="<?php
echo Images_Path;
?>
/connected.jpg">
<?php
} else {
?>
<img src="<?php
echo Images_Path;
?>
/terminated.jpg">
<?php
}
?>
</td>
</tr>
<tr>
<td align="left"> <img src="<?php
echo Images_Path;
?>
/connected.jpg"> <?php
echo gettext("Connected");
?>
<img src="<?php
echo Images_Path;
?>
/terminated.jpg"> <?php
echo gettext("Disconnected");
?>
</td>
</table>
<?php
$html = ob_get_contents();
// delete output-Buffer
ob_end_clean();
$pdf = new HTML2FPDF();
$pdf->DisplayPreferences('HideWindowUI');
$pdf->AddPage();
$pdf->WriteHTML($html);
$stream = $pdf->Output('UnBilledDetails_' . date("d/m/Y-H:i") . '.pdf', 'S');
//================================Email Template Retrival Code ===================================
$QUERY = "SELECT mailtype, fromemail, fromname, subject, messagetext, messagehtml FROM cc_templatemail WHERE mailtype='invoice' ";
$res = $DBHandle->Execute($QUERY);
$num = 0;
if ($res) {
$num = $res->RecordCount();
}
if (!$num) {
echo "<br>Error : No email Template Found";
exit;
}
for ($i = 0; $i < $num; $i++) {
$listtemplate[] = $res->fetchRow();
}
list($mailtype, $from, $fromname, $subject, $messagetext, $messagehtml) = $listtemplate[0];
if ($FG_DEBUG == 1) {
echo "<br><b>mailtype : </b>{$mailtype}</br><b>from:</b> {$from}</br><b>fromname :</b> {$fromname}</br><b>subject</b> : {$subject}</br><b>ContentTemplate:</b></br><pre>{$messagetext}</pre></br><hr>";
}
//================================================================================================
$ok = send_email_attachment($from, $info_customer[0][10], $subject, $messagetext, 'UnBilledDetails_' . date("d/m/Y-H:i") . '.pdf', $stream);
return $ok;
}
示例6: dirname
<?php
require_once dirname(__FILE__) . '/../../includes/global.inc.php';
// pdf was breaking
define(RELATIVE_PATH, '');
switch ($_GET['action']) {
case 'word':
require_once dirname(__FILE__) . '/HTML2Doc.php';
$doc = new HTML_TO_DOC();
$doc->setTitle(iBeginShare::quoteSmart($_GET['title']));
$doc->createDoc($raw_content, (strlen(iBeginShare::quoteSmart($_GET['title'])) > 0 ? str_replace(' ', '-', strip_tags($_GET['title'])) : 'Document-' . date('Y-m-d')) . '.doc');
break;
case 'pdf':
require_once dirname(__FILE__) . '/html2fpdf/html2fpdf.php';
$pdf = new HTML2FPDF();
$pdf->DisplayPreferences($_GET['title']);
$pdf->AddPage();
$pdf->WriteHTML(html_entity_decode($raw_content));
$pdf->Output((strlen(iBeginShare::quoteSmart($_GET['title'])) > 0 ? str_replace(' ', '-', strip_tags($_GET['title'])) : 'Document-' . date('Y-m-d')) . '.pdf', 'D');
break;
}
示例7: define
static function html2pdf($html, $encode = "SJIS")
{
//echo 1;exit;
//$html=self::pdf_change_encode($html,$encode);
define('FPDF_FONTPATH', ROOT . 'lib/html2fpdf/font/');
include ROOT . 'lib/html2fpdf/jphtml2fpdf.php';
$pdf = new HTML2FPDF("l", "mm", "A4");
$pdf->Open();
$pdf->SetCompression(false);
$pdf->SetDisplayMode("real");
$pdf->UseCSS();
$pdf->UsePRE();
$pdf->AddSJISFont();
$pdf->setBasePath("");
$pdf->AddPage();
//ファイル情報
$pdf->SetAuthor("HPX");
$pdf->Bookmark("HPX");
$pdf->SetTitle("HPX");
$pdf->SetCreator("HPX");
// 本文
$pdf->SetMargins(10, 10);
$pdf->DisplayPreferences('HideWindowUI');
//$pdf->SetFont( HideWindowUI,"",8);
$pdf->WriteHTML($html);
// 出力
$pdf->Output('doc.pdf', 'D');
exit;
}
示例8: createPDF
function createPDF()
{
global $smarty;
$smarty = new Smarty();
templateAssignInvoice('smarty', $this);
templateAssignSystemvars('smarty');
$smarty->assign('invoice_heading', 'Faktura');
$pdf = new HTML2FPDF();
$pdf->DisplayPreferences('HideWindowUI');
$pdf->AddPage();
$pdf->WriteHTML($smarty->fetch('file:invoice.tpl'));
$pdf->Output('invoice/invoice' . $this->invoice_id . '.pdf');
$smarty->assign('invoice_heading', 'Fakturakopi');
$pdf = new HTML2FPDF();
$pdf->DisplayPreferences('HideWindowUI');
$pdf->AddPage();
$pdf->WriteHTML($smarty->fetch('file:invoice.tpl'));
$pdf->Output('invoice/invoice' . $this->invoice_id . '_copy.pdf');
}