本文整理汇总了PHP中HTML2PDF::Output方法的典型用法代码示例。如果您正苦于以下问题:PHP HTML2PDF::Output方法的具体用法?PHP HTML2PDF::Output怎么用?PHP HTML2PDF::Output使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HTML2PDF
的用法示例。
在下文中一共展示了HTML2PDF::Output方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: imprimirOrdenCompra
public function imprimirOrdenCompra($detalle, $anexos, $system, $id_orden){
require_once(APP_PATH . 'common/plugins/sigma/demos/export_php/html2pdf/html2pdf.class.php');
template()->buildFromTemplates('report/orden_compra.html');
page()->setTitle('Orden de compra');
page()->addEstigma("detalle", array('SQL', $detalle));
page()->addEstigma("anexos", array('SQL', $anexos));
page()->addEstigma("norden", $id_orden);
page()->addEstigma("nombre_empresa", $system->nombre_comercial);
page()->addEstigma("direccion_empresa", $system->direccion);
@template()->parseOutput();
@template()->parseExtras();
$html2pdf = new HTML2PDF('L', 'lette', 'es');
$html2pdf->WriteHTML(page()->getContent());
$html2pdf->Output('ticket.pdf');
}
示例2: getIndex
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function getIndex($order_id)
{
$id = $order_id;
$invoicedata = Invoice::where('Id', $id)->get();
$html22 = View('viewinvoice')->with(array('invoicedata' => $invoicedata))->render();
require_once app_path() . '/libs/html2pdf/html2pdf.class.php';
$html2pdf = new \HTML2PDF('P', 'A4', 'en', true, 'UTF-8', array(0, 0, 0, 0));
// $html2pdf->pdf->SetDisplayMode('fullpage');
$html2pdf->WriteHTML($html22);
$html2pdf->Output('Invoice.pdf');
}
示例3: cetak
public function cetak()
{
$npm = $this->session->userdata('npm');
ob_start();
$data['nilai'] = $this->Model_nilai->getNilai($npm);
$this->load->view('member/nilai/print', $data);
$html = ob_get_contents();
ob_get_clean();
require_once './assets/html2pdf/html2pdf.class.php';
$pdf = new HTML2PDF('P', 'A4', 'en');
$pdf->WriteHTML($html);
$pdf->Output('Data Nilai.pdf', 'R');
}
示例4: actionPendidikans
public function actionPendidikans()
{
$html2pdf = Yii::app()->ePdf->html2pdf('L', 'A4', 'en', false, 'ISO-8859-15', array(10, 5, 10, 5));
$html2pdf->pdf->SetDisplayMode('fullpage');
$dosen = Yii::app()->request->getParam('id_dosen', 0);
$pj = Yii::app()->request->getParam('pengajuan', 0);
$sql = "select unsur_pendidikan.ID_UNSUR_PEND,subun_pend.SUBUNPEND,tbl_dosen.NAMA_DOSEN, tbl_dosen.NIP_DOSEN, \n tbl_jabatan.NAMA_JABATAN, tbl_golongan.GOLONGAN, tbl_golongan.PANGKAT, tbl_jurusan.NAMA_JURUSAN, \n tbl_jurusan.NAMA_PIMPINAN, tbl_jurusan.NIP_PIMPINAN, tbl_jurusan.PANGKAT AS PJ, tbl_jurusan.GOLONGAN AS GJ, tbl_fakultas.NAMA_FAKULTAS, \n unsur_pendidikan.KEGIATAN_PENDIDIKAN, unsur_pendidikan.TEMPAT_PENDIDIKAN, \n unsur_pendidikan.TGL_KEGIATAN_PEND, unsur_pendidikan.NILAI_PENDIDIKAN, \n unsur_pendidikan.BUKTI_PENDIDIKAN, unsur_pendidikan.PENGAJUAN_KE \n from unsur_pendidikan inner join subun_pend on \n unsur_pendidikan.ID_SUBUNPEND=subun_pend.ID_SUBUNPEND join tbl_dosen \n on unsur_pendidikan.ID_DOSEN=tbl_dosen.ID_DOSEN join tbl_jabatan on \n tbl_dosen.ID_JABATAN=tbl_jabatan.ID_JABATAN join tbl_golongan on \n tbl_dosen.ID_GOLONGAN=tbl_golongan.ID_GOLONGAN join tbl_jurusan on \n tbl_dosen.ID_JURUSAN=tbl_jurusan.ID_JURUSAN join tbl_fakultas on \n tbl_jurusan.ID_FAKULTAS=tbl_fakultas.ID_FAKULTAS where \n unsur_pendidikan.ID_DOSEN='{$dosen}' and unsur_pendidikan.PENGAJUAN_KE='{$pj}' ";
$data = Yii::app()->db->createCommand($sql)->queryAll();
$content = $this->renderPartial('pendidikans', array('data' => $data), true);
$html2pdf = new HTML2PDF('L', 'A4', 'en', array(10, 5, 10, 5));
$html2pdf->WriteHTML($content);
$html2pdf->Output();
}
示例5: save
public function save($file)
{
$pdfs = array();
foreach ($this->_html as $i => $page) {
$f = '/tmp/' . Athem_Utils::randString(10);
$pdf = new HTML2PDF($this->_getOrientation(), $this->_getSize(), 'en');
$pdf->WriteHTML($page);
$pdf->Output("{$f}.pdf", 'F');
$pdfs[] = "{$f}.pdf";
}
$pdfMerge = Athem_Pdf_Merge_Abstract::factory($this->_page['merge'], $pdfs);
$pdfMerge->save($file);
}
示例6: smarty_function_article_pdf
/**
* Newscoop article_pdf function plugin
*
* Type: function
* Name: article_pdf
* Purpose:
*
* @param array
* $params[template]
* $params[prefix]
* @param object
* $smarty The Smarty object
*/
function smarty_function_article_pdf($params, &$smarty)
{
// gets the context variable
$gimme = $smarty->getTemplateVars('gimme');
if (isset($params['template'])) {
$template = $params['template'];
}
$pdf_filename = '';
if (isset($params['prefix'])) {
$pdf_filename = $params['prefix'] . '-';
}
$publish = new DateTime($gimme->article->publish_date);
$pdf_filename .= 'p' . $publish->format('Ymd') . '-n' . $gimme->article->number . '.pdf';
$pdf_file = 'public/pdf/' . $pdf_filename;
if (!file_exists($pdf_file) || $gimme->article->last_update > date('Y-m-d h:i:s', filemtime($pdf_file))) {
require 'include/html2pdf/html2pdf.class.php';
try {
$content = $smarty->fetch($template);
$html2pdf = new HTML2PDF('P', 'A4', 'de');
$html2pdf->pdf->SetDisplayMode('real');
$html2pdf->writeHTML($content);
$html2pdf->Output($pdf_file, 'F');
} catch (HTML2PDF_exception $e) {
return '';
}
}
return $pdf_file;
}
示例7: HTML2PDF
protected static function HTML2PDF($html, $fileout)
{
self::loadLib('/html2pdf/html2pdf.class.php');
$html2pdf = new HTML2PDF('P', 'A4', 'en');
$html2pdf->WriteHTML($html);
return $html2pdf->Output($fileout, 'F');
}
示例8: html2pdf
function html2pdf($html, $nombre = "archivo.pdf", $orientacion = "P", $tamanio = "A4", $tituloDocumento = '')
{
$colegioSessionBean = new ColegioSessionBean();
$fechaActual = obtenerFechaActualFull();
$html = str_replace("\\", "", $html);
ob_start();
//include(dirname(__FILE__).'/res/exemple07a.php');
//include(dirname(__FILE__).'/res/exemple07b.php');
echo '<link rel="stylesheet" href="' . PATH_HTTP . 'css/tablas.css" type="text/css" />';
//$html = ereg_replace("\\", "XD", $html);
echo '<table>
<tr>
<td align="center" width="1200"><strong>' . $colegioSessionBean->getNombre() . '</strong> <br/>' . $tituloDocumento . '</td>
<td rowspan="2"><img alt="logo" title="logo" src="' . PATH_HTTP . 'images/' . $colegioSessionBean->getColegio_ID() . '/logo.jpg"></td>
</tr>
</table>
<div style="width:1200px; align=right;font-size:8px;">Informe generado el ' . $fechaActual . '</div><br/>';
echo $html;
$content = ob_get_clean();
// conversion HTML => PDF
//require_once(dirname(__FILE__).'/../html2pdf.class.php');
$html2pdf = new HTML2PDF($orientacion, $tamanio, 'es');
$html2pdf->pdf->SetDisplayMode('fullpage');
//$html2pdf->pdf->
// $html2pdf->pdf->SetProtection(array('print'), 'spipu');
$html2pdf->WriteHTML($content, isset($_GET['vuehtml']));
//echo $content;
$html2pdf->Output($nombre);
}
示例9: postApproveinvoice
public function postApproveinvoice(Request $request)
{
$approve_id = Input::get('invoice_approve_id');
$post = Input::get();
$i = Invoice::where('Id', $approve_id)->update(array('Status' => $post['approve_status']));
$invoicedata = Invoice::where('Id', $approve_id)->get();
foreach ($invoicedata as $inv) {
$email = $inv->ClientEmail;
$invno = $inv->InvoiceCode;
$clientmail = $inv->ClientName;
}
if ($i > 0) {
$html22 = View('pdfgenerate')->with(array('invoicedata' => $invoicedata))->render();
$html1 = "<h1>adsfadsfasdf</h1>";
require_once app_path() . '/libs/html2pdf/html2pdf.class.php';
$html2pdf = new \HTML2PDF('P', 'A4', 'en', true, 'UTF-8', array(0, 0, 0, 0));
// $html2pdf->pdf->SetDisplayMode('fullpage');
$html2pdf->WriteHTML($html22);
$htmltosend = $html2pdf->Output('', 'S');
$a = 'IDE | Proforma invoice_';
$subject = $a . $invno . $clientmail;
Mail::send('emails.invoice', ['Invoice' => 'hgff'], function ($message) use($subject, $htmltosend, $email) {
// note: if you don't set this, it will use the defaults from config/mail.php
$message->from('invoice@ide-global.com', 'IDE Consulting Services Pvt Ltd');
$message->to($email)->subject($subject)->attachData($htmltosend, 'invoice.pdf', array('mime' => 'application/pdf', 'Content-Disposition' => 'attachment'));
});
$request->session()->flash('alert-success', 'Invoice has been set to client !');
return redirect('home2');
}
}
示例10: voucher
public function voucher($numFile = false)
{
if (!$numFile) {
$this->redireccionar('booking');
}
//Session::acceso('Usuario');
$numFile = base64_decode($numFile);
$numFile = $numFile * 1;
$ruta_img = 'views/layout/' . DEFAULT_LAYOUT . '/img/';
$ruta_img2 = 'public/img/voucher/';
ob_start();
require_once ROOT . 'views' . DS . 'system' . DS . 'pdf' . DS . 'vouchea.php';
$content = ob_get_clean();
$this->getLibrary('html2pdf.class');
try {
$html2pdf = new HTML2PDF('P', 'A4', 'es', false, CHARSET);
//$html2pdf->setModeDebug();
$html2pdf->setDefaultFont('Arial');
$html2pdf->writeHTML($content, isset($_GET['vuehtml']));
$html2pdf->Output('Voucher_N_' . $numFile . '.pdf');
} catch (HTML2PDF_exception $e) {
echo $e;
exit;
}
}
示例11: Core
function laporan_pdf($kd_fakultas, $kd_prodi, $tahun, $nim)
{
$this->load->library('HTML2PDF');
$html2pdf = new HTML2PDF('P', 'A4', 'fr');
$html2pdf->setDefaultFont('Arial');
//filter
#get filter
$fil['kd_fakultas'] = $kd_fakultas;
$fil['kd_prodi'] = $kd_prodi;
$fil['tahun'] = $tahun;
$fil['nim'] = $nim;
//$data['nama'] = '';
$data['namaUniv'] = 'STMIK BANDUNG';
$data['alamatUniv'] = 'Jl.Phh.Mustofa No. 39. Grand Surapati Core (SUCORE) Blok M No.19, Telp.022 - 7207777';
$data['kotaUniv'] = 'Bandung, Jawa Barat';
// ambil data dari tabel
$data['data_pdf'] = $this->mdl_khs->get_pdf($fil, $nama_dosen);
/* if (count($da['row'])==0){
echo "Data Tidak Tersedia";
return;
} */
$konten = $this->load->view('perkuliahan/khs_laporan', $data, true);
$html2pdf->writeHTML($konten, false);
$html2pdf->Output('khs.pdf');
}
示例12: rappel
function rappel($buffer)
{
$date = date('Ymd-hi');
$html2pdf = new HTML2PDF('P', 'LETTER', 'fr');
$html2pdf->writeHTML($buffer);
$html2pdf->Output($date . '_valeur_inventaire.pdf', 'D');
}
示例13:
function laporan_pdf($kode)
{
$data['kd_mahasiswa'] = $kode;
$this->load->library('HTML2PDF');
$html2pdf = new HTML2PDF('L', 'Letter', 'fr');
$html2pdf->setDefaultFont('Arial');
//filter
#get filter
/* $fil['kd_fakultas'] = $kd_fakultas;
$fil['kd_prodi'] = $kd_prodi;
$fil['tahun'] = $tahun;
$fil['nim'] = $nim; */
//$data['nama'] = 'indriyanto';
$data['namaUniv'] = 'UNIVERSITAS SUBANG';
$data['alamatUniv'] = 'Jln. Perkutut Kotaraja, Telp.(0967)581562';
$data['kotaUniv'] = 'Subang, Jawa Barat';
// ambil data dari tabel
$data['data_pdf'] = $this->mdl_ijazah->get_pdf($kode);
/* if (count($da['row'])==0){
echo "Data Tidak Tersedia";
return;
} */
$konten = $this->load->view('ta/ijazah_format', $data, true);
$html2pdf->writeHTML($konten, false);
$html2pdf->Output('exemple00.pdf');
}
示例14: convertHtmlToFormat
public function convertHtmlToFormat($orientation = 'P')
{
require_once 'html2pdf/html2pdf.class.php';
$html2pdf = new HTML2PDF($orientation, 'A4', 'fr');
$html2pdf->setDefaultFont('times');
$html2pdf->WriteHTML($this->docTemplate->render());
$this->doc = $html2pdf->Output(NULL, 'S');
}
示例15: html2pdf
/**
* @throws HTML2PDF_exception
*/
public function html2pdf()
{
$content = "\n\t\t<page>\n\t\t <h1>Exemple d'utilisation</h1>\n\t\t <br>\n\t\t Ceci est un <b>exemple d'utilisation</b>\n\t\t de <a href='http://html2pdf.fr/'>HTML2PDF</a>.<br>\n\t\t</page>";
//require_once(dirname(__FILE__).'/html2pdf/html2pdf.class.php');
$html2pdf = new HTML2PDF('P', 'A4', 'fr');
$html2pdf->WriteHTML(file_get_contents($this->load->view('htmlpdf')));
$html2pdf->Output('exemple.pdf');
}