本文整理汇总了PHP中mPDF::SetTitle方法的典型用法代码示例。如果您正苦于以下问题:PHP mPDF::SetTitle方法的具体用法?PHP mPDF::SetTitle怎么用?PHP mPDF::SetTitle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mPDF
的用法示例。
在下文中一共展示了mPDF::SetTitle方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: pdf
public function pdf($content, $namafile, $paper_size = '', $orientation = 'P', $border = true, $title = '', $subject = '', $mode = 'D', $watermark = false)
{
$margin = 20;
$namafile = preg_replace('/\\.pdf$/', '', $namafile);
$mL = $mR = $mT = $mB = $margin;
// $mB = $margin + 50;
$mH = 0;
$mF = 0;
if (!$paper_size) {
$paper_size = array(215, 330);
}
Yii::import('system.docotel.cms.extensions.mpdf.mPDF');
$mpdf = new mPDF('', $paper_size, 0, '', $mL, $mR, $mT, $mB, $mH, $mF, $orientation);
$mpdf->SetDefaultFont('Arial');
$mpdf->SetProtection(array('print', 'print-highres'), '', md5(time()), 128);
$mpdf->SetTitle($title);
$mpdf->SetAuthor('Makarim & Taira');
$mpdf->SetCreator('News');
$mpdf->SetSubject($subject);
$mpdf->h2toc = array('H4' => 0, 'H5' => 1);
//$mpdf->setFooter('{PAGENO}');
// $stylesheet = file_get_contents(Yii::app()->getBaseUrl(true).'/themes/flatlab/assets/css/bootstrap.min.css'); // external css
// $mpdf->WriteHTML($stylesheet,1);
// echo $content; exit;
$mpdf->WriteHTML($content);
$mpdf->Output($namafile . '.pdf', $mode);
if ($mode === 'D' or $mode === 'I') {
exit;
}
}
示例2: register
/**
* Register the service provider.
*
* @return void
*/
public function register()
{
$this->app->bind('mpdf.wrapper', function ($app, $cfg) {
$app['mpdf.pdf'] = $app->share(function ($app) use($cfg) {
if (!empty($cfg)) {
foreach ($cfg as $key => $value) {
Config::set('pdf.' . $key, $value);
}
}
$mpdf = new \mPDF(Config::get('pdf.mode'), Config::get('pdf.defaultFontSize'), Config::get('pdf.defaultFont'), Config::get('pdf.marginLeft'), Config::get('pdf.marginRight'), Config::get('pdf.marginTop'), Config::get('pdf.marginBottom'), Config::get('pdf.marginHeader'), Config::get('pdf.Footer'), Config::get('pdf.orientation'));
$permissions = [];
foreach (Config::get('pdf.protection.permissions') as $perm => $enable) {
if ($enable) {
$permissions[] = $perm;
}
}
$mpdf->SetProtection($permissions, Config::get('pdf.protection.user_password'), Config::get('pdf.protection.owner_password'), Config::get('pdf.protection.length'));
$mpdf->SetTitle(Config::get('pdf.title'));
$mpdf->SetAuthor(Config::get('pdf.author'));
$mpdf->SetWatermarkText(Config::get('pdf.watermark'));
$mpdf->showWatermarkText = Config::get('pdf.showWatermark');
$mpdf->watermark_font = Config::get('pdf.watermarkFont');
$mpdf->watermarkTextAlpha = Config::get('pdf.watermarkTextAlpha');
$mpdf->SetDisplayMode(Config::get('pdf.displayMode'));
return $mpdf;
});
return new PdfWrapper($app['mpdf.pdf']);
});
}
示例3: register
/**
* Register the service provider.
*
* @return void
*/
public function register()
{
$this->app->bind('mpdf.wrapper', function ($app, $cfg) {
if ($cfg) {
$app['mpdf.pdf'] = $app->share(function ($app) use($cfg) {
$mpdf = new \mPDF($cfg[0], $cfg[1], $cfg[2], $cfg[3], $cfg[4], $cfg[5], $cfg[6], $cfg[7], $cfg[8], $cfg[9], $cfg[10]);
$mpdf->SetProtection(array('print'));
$mpdf->SetTitle("");
$mpdf->SetAuthor("");
$mpdf->SetWatermarkText("");
$mpdf->showWatermarkText = true;
$mpdf->watermark_font = 'DejaVuSansCondensed';
$mpdf->watermarkTextAlpha = 0.1;
$mpdf->SetDisplayMode('fullpage');
return $mpdf;
});
} else {
$mpdf = new \mPDF('th', 'A4', '', '', 10, 10, 10, 10, 10, 5);
$mpdf->SetProtection(array('print'));
$mpdf->SetTitle("");
$mpdf->SetAuthor("");
$mpdf->SetWatermarkText("");
$mpdf->showWatermarkText = true;
$mpdf->watermark_font = 'DejaVuSansCondensed';
$mpdf->watermarkTextAlpha = 0.1;
$mpdf->SetDisplayMode('fullpage');
$app['mpdf.pdf'] = $mpdf;
}
return new PdfWrapper($app['mpdf.pdf']);
});
// // work --------------------------------------------------------------------------start ----------
// $this->app['mpdf.pdf'] = $this->app->share(function($app)
// {
// // $cfg =['th','A0','','',10,10,10,10,10,5,'L'];
// $cfg = $app['config']['mpdfconfig.pdf.options'];
// consolelog('cfg',$cfg);
// if($cfg) {
// $mpdf = new \mPDF( $cfg[0],$cfg[1],$cfg[2],$cfg[3],$cfg[4],$cfg[5],$cfg[6],$cfg[7],$cfg[8],$cfg[9],$cfg[10] );
// } else {
// $mpdf=new \mPDF('th','A4','','',10,10,10,10,10,5);
// }
// $mpdf->SetProtection(array('print'));
// $mpdf->SetTitle("TOMATO POS - Invoice");
// $mpdf->SetAuthor("Thongchai Lim");
// $mpdf->SetWatermarkText("Paid");
// $mpdf->showWatermarkText = true;
// $mpdf->watermark_font = 'DejaVuSansCondensed';
// $mpdf->watermarkTextAlpha = 0.1;
// $mpdf->SetDisplayMode('fullpage');
// return $mpdf;
// });
// $this->app['mpdf.wrapper'] = $this->app->share(function($app)
// {
// return new PdfWrapper($app['mpdf.pdf']);
// });
// // work --------------------------------------------------------------------------end----------
}
示例4: pdf_create
function pdf_create($html, $filename, $stream = true, $textoMarcaDagua = null, $path = null, $css = null, $idEmissor = null, $orientacao = null)
{
$arrayParams = array();
require_once APPPATH . 'helpers/mpdf/mpdf.php';
$CI =& get_instance();
$CI->load->model('comum/empresas_model', 'empresas_model');
$paramVariaveis = 'relatorio_variaveis_padrao';
$paramModelo = 'relatorio_modelo_padrao';
if ($CI->session->userdata('idEmissor') != null) {
$arrayParams = $CI->empresas_model->getParametros($CI->session->userdata('idEmissor'));
} elseif ($idEmissor != null) {
$arrayParams = $CI->empresas_model->getParametros($idEmissor);
} else {
$arrayParams = $CI->empresas_model->getParametros($CI->usuariologado->getIdEmpresa());
}
$mpdf = new mPDF('c', $orientacao == 'L' ? 'A4-L' : '', 9, 'Verdana', 18, 18, 35, 20, 0, 10, $orientacao);
$mpdf->SetTitle($filename);
$mpdf->SetHTMLHeader($CI->load->view('pdfHeader', null, true));
$mpdf->SetHTMLFooter($CI->load->view('pdfFooter', null, true));
if (!empty($css)) {
$mpdf->WriteHTML(file_get_contents($css), 1);
} else {
$mpdf->WriteHTML(file_get_contents('assets/css/report.css'), 1);
}
if ($textoMarcaDagua != null) {
$mpdf->SetWatermarkText($textoMarcaDagua);
$mpdf->showWatermarkText = true;
}
$mpdf->WriteHTML($html, 2);
$mpdf->SetAutoFont();
if ($path !== '' && $path !== null) {
if (!file_exists($path)) {
mkdir($path, 0777, true);
}
}
if ($stream) {
$mpdf->Output($path . DS . $filename . '.pdf', 'F');
} else {
$mpdf->Output();
}
}
示例5: mPDF
<?php
$mpdf = new mPDF('', '', 0, '', 10, 10, 16, 16, 9, 26, 'L');
$stylesheet = file_get_contents("../web/css/relatorios-css/relatorio.css");
$mpdf->WriteHTML($stylesheet, 1);
$mpdf->SetTitle($model->titulo);
// Set a simple Footer including the page number
$mpdf->setFooter('<div>Relatório emitido SiGeCentro <br> {PAGENO}/{nb}</div>');
// Turn off (suppress) page numbering from the start of the document
$mpdf->AddPage('', '', '', '', 'on');
$header = "<div id='cabecalho' >\n \t\t\t<div id='cabecalho-imagem'>\n \t\t\t\t<img id='cabecalho-img' src='" . $model->getImagemLogo() . "'/>\n \t\t\t</div>\t\n \t\t\t<div id='cabecalho-titulo' >\n \t\t\t\t" . $model->titulo . "\n \t\t\t</div>\n \t\t\t<div id='cabecalho-emissao'>\n <b>SiGeCentro</b> \n <br/>\n \t\t\t\t<b>Emitido em: " . $model->getDataHora() . "</b>\n\n \t\t\t</div>\t\n \t\t</div>\n <div class='clear'> </div>";
$mpdf->SetHTMLHeader($header, null, true);
$html = "<div id='corpo'>";
for ($i = 1; $i < 400; $i++) {
$html .= "linha número {$i} | " . $i % 40 . "<br>";
if ($i % 40 == 0) {
// realiza quebra de página e adiciona uma nova
$html .= "</div><pagebreak /><div id='corpo'>";
}
}
$html .= "</div>";
$mpdf->WriteHTML($html);
$mpdf->Output();
exit;
示例6: getUsuarios
function getUsuarios()
{
$usuarios = User::orderBy('type')->orderBy('name')->get();
$reporte = new Reporte("Lista de usuarios");
$filas = "";
if ($usuarios->count() == 0) {
$tabla = '<div style="text-align:center"><p>Sin datos para mostrar</p></div>';
} else {
$cont = 0;
foreach ($usuarios as $item) {
$cont++;
$mod = $cont % 2 == 0;
if ($mod == 1) {
$filas .= '<tr>' . '<td style="background: #E8EDFF; color: #1E252B; font-size: 12px; text-align: left;">' . $item->name . '</td>' . '<td style="background: #E8EDFF; color: #1E252B; font-size: 12px; text-align: center;">' . $item->username . '</td>' . '<td style="background: #E8EDFF; color: #1E252B; font-size: 12px; text-align: left;">' . $item->email . '</td>' . '<td style="background: #E8EDFF; color: #1E252B; font-size: 12px; text-align: center;">' . $item->type . '</td>' . '</tr>';
} else {
$filas .= '<tr>' . '<td style="background: #F5F5F5; color: #1E252B; font-size: 12px; text-align: left;">' . $item->name . '</td>' . '<td style="background: #F5F5F5; color: #1E252B; font-size: 12px; text-align: center;">' . $item->username . '</td>' . '<td style="background: #F5F5F5; color: #1E252B; font-size: 12px; text-align: left;">' . $item->email . '</td>' . '<td style="background: #F5F5F5; color: #1E252B; font-size: 12px; text-align: center;">' . $item->type . '</td>' . '</tr>';
}
}
$columnas = array('Nombres', 'Usuario', 'Correo', 'Tipo');
$tabla = $reporte->getTable($columnas, $filas);
}
$mpdf = new \mPDF('utf-8', 'A4', '', '', '15', '15', '28', '18');
$mpdf->SetTitle("Reporte");
$mpdf->SetHTMLHeader($reporte->getHeader());
$mpdf->SetHTMLFooter($reporte->getFooter());
$mpdf->WriteHTML($tabla);
$mpdf->Output('reporte.pdf', 'I');
}
示例7: getClientes
function getClientes()
{
$clientes = Clientes::orderBy('nombres')->orderBy('apellidos')->get();
$reporte = new Reporte("Lista de clientes");
$filas = "";
if ($clientes->count() == 0) {
$tabla = '<div style="text-align:center"><p>Sin datos para mostrar</p></div>';
} else {
$cont = 0;
foreach ($clientes as $item) {
$cont++;
$mod = $cont % 2 == 0;
if ($mod == 1) {
$filas .= '<tr>' . '<td style="background: #E8EDFF; color: #1E252B; font-size: 12px; text-align: center;">' . $item->identificacion . '</td>' . '<td style="background: #E8EDFF; color: #1E252B; font-size: 12px; text-align: left;">' . $item->nombres . '</td>' . '<td style="background: #E8EDFF; color: #1E252B; font-size: 12px; text-align: left;">' . $item->apellidos . '</td>' . '<td style="background: #E8EDFF; color: #1E252B; font-size: 12px; text-align: left;">' . $item->correo . '</td>' . '<td style="background: #E8EDFF; color: #1E252B; font-size: 12px; text-align: left;">' . $item->direccion . '</td>' . '<td style="background: #E8EDFF; color: #1E252B; font-size: 12px; text-align: center;">' . $item->telefono . '</td>' . '</tr>';
} else {
$filas .= '<tr>' . '<td style="background: #F5F5F5; color: #1E252B; font-size: 12px; text-align: center;">' . $item->identificacion . '</td>' . '<td style="background: #F5F5F5; color: #1E252B; font-size: 12px; text-align: left;">' . $item->nombres . '</td>' . '<td style="background: #F5F5F5; color: #1E252B; font-size: 12px; text-align: left;">' . $item->apellidos . '</td>' . '<td style="background: #F5F5F5; color: #1E252B; font-size: 12px; text-align: left;">' . $item->correo . '</td>' . '<td style="background: #F5F5F5; color: #1E252B; font-size: 12px; text-align: left;">' . $item->direccion . '</td>' . '<td style="background: #F5F5F5; color: #1E252B; font-size: 12px; text-align: center;">' . $item->telefono . '</td>' . '</tr>';
}
}
$columnas = array('Identificación', 'Nombres', 'Apellidos', 'Correo', 'Dirección', 'Teléfono');
$tabla = $reporte->getTable($columnas, $filas);
}
$mpdf = new \mPDF('utf-8', 'A4-L', '', '', '15', '15', '28', '18');
$mpdf->SetTitle("Reporte");
$mpdf->SetHTMLHeader($reporte->getHeader());
$mpdf->SetHTMLFooter($reporte->getFooter());
$mpdf->WriteHTML($tabla);
$mpdf->Output('reporte.pdf', 'I');
}
示例8: index
public function index()
{
$final_html = "";
$css = "<style type='text/css'>\n\t\ttd{\n\t\t\tborder:1px solid black; \n\t\t}\n\t\t.no_border{\n\t\t\tborder: none;\n\t\t} \n\t\t.regionals td{\n\t\t\tmin-width:110px;\n\t\t}\n\t\tth, .title{\n\t\t\tbackground:#DDD;\n\t\t\tborder:none;\n\t\t\tpadding:0;\n\t\t\tmargin:0;\n\t\t}\n\t\t\n\t\t</style>";
$final_html .= $css;
$html_title = "<img src='Images/coat_of_arms.png' style='position:absolute; width:160px; top:0px; right:0px; margin-bottom:-100px;margin-right:-100px;'></img>";
$html_title .= "<h2 style='text-align:center; text-decoration:underline;'>Republic of Kenya</h2>";
$html_title .= "<h3 style='text-align:center; text-decoration:underline;'>Ministry of Public Health and Sanitation</h3>";
$html_title .= "<h1 style='text-align:center; text-decoration:underline;'>MONTHLY VACCINE STOCK MANAGEMENT REPORT</h1>";
//echo "$html_title";
$final_html .= $html_title;
$final_html .= $this->create_national_report();
$this->load->library('mpdf');
$mpdf = new mPDF('', 'A4-L', 0, '', 15, 15, 16, 16, 9, 9, '');
$mpdf->SetTitle('MONTHLY VACCINE STOCK MANAGEMENT REPORT');
$mpdf->WriteHTML($final_html);
$regions = Regions::getAllRegions();
foreach ($regions as $region) {
$regional_report = $this->create_regional_reports($region);
$mpdf->AddPage();
$mpdf->WriteHTML($regional_report);
//
}
//echo $final_html
$mpdf->Output('Summaries/Monthly_Summary.pdf', 'F');
$this->email_reports();
}
示例9: getCuentas
public function getCuentas()
{
$facturas = CuentasxpagarModel::where("estado_activo", "=", 1)->join('proveedores', 'proveedores.id', '=', 'cuentasxpagar.proveedor_id')->groupBy('proveedor_id')->select(DB::raw('count(*) as contador, proveedores.identificacion, proveedores.nombres, Sum(saldo) as monto, proveedor_id'))->orderby('proveedores.nombres')->get();
$reporte = new Reporte("Cuentas por pagar");
$filas = "";
if ($facturas->count() == 0) {
$tabla = '<div style="text-align:center"><p>Sin datos para mostrar</p></div>';
} else {
$cont = 0;
foreach ($facturas as $item) {
$cont++;
$mod = $cont % 2 == 0;
if ($mod == 1) {
$filas .= '<tr>' . '<td style="background: #E8EDFF; color: #1E252B; font-size: 12px; text-align: center;">' . $item->identificacion . '</td>' . '<td style="background: #E8EDFF; color: #1E252B; font-size: 12px; text-align: center;">' . $item->nombres . ' ' . $item->apellidos . '</td>' . '<td style="background: #E8EDFF; color: #1E252B; font-size: 12px; text-align: center;">' . $item->contador . '</td>' . '<td style="background: #E8EDFF; color: #1E252B; font-size: 12px; text-align: center;">' . $item->monto . '</td>' . '</tr>';
} else {
$filas .= '<tr>' . '<td style="background: #F5F5F5; color: #1E252B; font-size: 12px; text-align: center;">' . $item->identificacion . '</td>' . '<td style="background: #F5F5F5; color: #1E252B; font-size: 12px; text-align: center;">' . $item->nombres . '</td>' . '<td style="background: #F5F5F5; color: #1E252B; font-size: 12px; text-align: center;">' . $item->contador . '</td>' . '<td style="background: #F5F5F5; color: #1E252B; font-size: 12px; text-align: center;">' . $item->monto . '</td>' . '</tr>';
}
}
$columnas = array('Identificación', 'Proveedores', 'Facturas', 'Total');
$tabla = $reporte->getTable($columnas, $filas);
}
$mpdf = new \mPDF('utf-8', 'A4', '', '', '15', '15', '28', '18');
$mpdf->SetTitle("Reporte");
$mpdf->SetHTMLHeader($reporte->getHeader());
$mpdf->SetHTMLFooter($reporte->getFooter());
$mpdf->WriteHTML($tabla);
$mpdf->Output('reporte.pdf', 'I');
}
示例10: register
/**
* Register the service provider.
*
* @return void
*/
public function register()
{
// load config
$this->mergeConfigFrom(__DIR__ . '/../../config/pdf.php', 'pdf');
// bind wrapper
$this->app->bind('mpdf.wrapper', function ($app, $cfg) {
$app['mpdf.pdf'] = $app->share(function ($app) use($cfg) {
if (!empty($cfg)) {
foreach ($cfg as $key => $value) {
Config::set('pdf.' . $key, $value);
}
}
$mpdf = new \mPDF(Config::get('pdf.mode'), Config::get('pdf.format'), Config::get('pdf.defaultFontSize'), Config::get('pdf.defaultFont'), Config::get('pdf.marginLeft'), Config::get('pdf.marginRight'), Config::get('pdf.marginTop'), Config::get('pdf.marginBottom'), Config::get('pdf.marginHeader'), Config::get('pdf.marginFooter'), Config::get('pdf.orientation'));
$mpdf->SetProtection(array('print'));
$mpdf->SetTitle(Config::get('pdf.title'));
$mpdf->SetAuthor(Config::get('pdf.author'));
$mpdf->SetWatermarkText(Config::get('pdf.watermark'));
$mpdf->showWatermarkText = Config::get('pdf.showWatermark');
$mpdf->watermark_font = Config::get('pdf.watermarkFont');
$mpdf->watermarkTextAlpha = Config::get('pdf.watermarkTextAlpha');
$mpdf->SetDisplayMode(Config::get('pdf.displayMode'));
return $mpdf;
});
return new PdfWrapper($app['mpdf.pdf']);
});
}
示例11: register
/**
* Register the service provider.
*
* @return void
*/
public function register()
{
$this->mergeConfigFrom(__DIR__ . '/../config/pdf.php', 'pdf');
$this->app->bind('mpdf.wrapper', function ($app, $cfg) {
if (Config::has('pdf.custom_font_path') && Config::has('pdf.custom_font_data')) {
define(_MPDF_SYSTEM_TTFONTS_CONFIG, __DIR__ . '/../mpdf_ttfonts_config.php');
}
$mpdf = new \mPDF(Config::get('pdf.mode'), Config::get('pdf.format'), Config::get('pdf.default_font_size'), Config::get('pdf.default_font'), Config::get('pdf.margin_left'), Config::get('pdf.margin_right'), Config::get('pdf.margin_top'), Config::get('pdf.margin_bottom'), Config::get('pdf.margin_header'), Config::get('pdf.margin_footer'), Config::get('pdf.orientation'));
$mpdf->SetTitle(Config::get('pdf.title'));
$mpdf->SetAuthor(Config::get('pdf.author'));
$mpdf->SetWatermarkText(Config::get('pdf.watermark'));
$mpdf->SetDisplayMode(Config::get('pdf.display_mode'));
$mpdf->showWatermarkText = Config::get('pdf.show_watermark');
$mpdf->watermark_font = Config::get('pdf.watermark_font');
$mpdf->watermarkTextAlpha = Config::get('pdf.watermark_text_alpha');
return new PdfWrapper($mpdf);
});
}
示例12: register
/**
* Register the service provider.
*
* @return void
*/
public function register()
{
$this->package('kendu/l4-mpdf');
$this->app['mpdf.pdf'] = $this->app->share(function ($app) {
$base = $app['config']->get('l4-mpdf::config.pdf.base');
$options = $app['config']->get('l4-mpdf::config.pdf.options');
$mpdf = new \mPDF(Config::get('pdf.mode'), Config::get('pdf.defaultFontSize'), Config::get('pdf.defaultFont'), Config::get('pdf.marginLeft'), Config::get('pdf.marginRight'), Config::get('pdf.marginTop'), Config::get('pdf.marginBottom'), Config::get('pdf.marginHeader'), Config::get('pdf.Footer'), Config::get('pdf.orientation'));
$mpdf->SetProtection(array('print'));
$mpdf->SetTitle(Config::get('pdf.title'));
$mpdf->SetAuthor(Config::get('pdf.author'));
$mpdf->SetWatermarkText(Config::get('pdf.watermark'));
$mpdf->showWatermarkText = Config::get('pdf.showWatermark');
$mpdf->watermark_font = Config::get('pdf.watermarkFont');
$mpdf->watermarkTextAlpha = Config::get('pdf.watermarkTextAlpha');
$mpdf->SetDisplayMode(Config::get('pdf.displayMode'));
return $mpdf;
});
$this->app['mpdf.wrapper'] = $this->app->share(function ($app) {
return new PdfWrapper($app['mpdf.pdf']);
});
}
示例13: pdf_export
/**
* Export a pdf
*
* @static
* @param string $title Document title
* @param string $css CSS Contents
* @param string $html HTML Contents
* @param string $page_format Default A4
* @param string $orientation Can be P|L
* @return boolean
*/
public static function pdf_export($title, $css, $html, $page_format = 'A4', $orientation = 'P')
{
// language set
$l = array();
$l['a_meta_charset'] = 'UTF-8';
$l['a_meta_dir'] = 'rtl';
$l['a_meta_language'] = X4Route_core::$lang;
$l['w_page'] = _PAGE;
X4Core_core::auto_load('mpdf_library');
// create the PDF object
$mpdf = new mPDF(X4Route_core::$lang, $page_format, 0, 0, 0, 0, 0, 0, $orientation);
$title = SERVICE . ' - ' . $title . ' - ' . date('Y-m-d H:i:s');
$mpdf->SetAuthor($_SESSION['nickname']);
$mpdf->SetCreator(SERVICE);
$mpdf->SetTitle($title);
$mpdf->SetDisplayMode('fullwidth');
$mpdf->WriteHTML($css, 1);
$mpdf->WriteHTML($html, 2);
$filename = X4Utils_helper::unspace(str_replace(' - ', '-', $title), true);
$mpdf->Output($filename . '.pdf', 'D');
exit;
}
示例14: register
/**
* Register the service provider.
*
* @return void
*/
public function register()
{
$this->package('shinomontaz/l4-mpdf');
if ($this->app['config']->get('l4-mpdf::config.pdf.enabled')) {
$this->app['mpdf.pdf'] = $this->app->share(function ($app) {
$base = $app['config']->get('l4-mpdf::config.pdf.base');
$options = $app['config']->get('l4-mpdf::config.pdf.options');
$mpdf = new \mPDF('win-1252', 'A4', '', '', 10, 10, 40, 35, 10, 5);
$mpdf->SetProtection(array('print'));
$mpdf->SetTitle("Acme Trading Co. - Invoice");
$mpdf->SetAuthor("Acme Trading Co.");
$mpdf->SetWatermarkText("Paid");
$mpdf->showWatermarkText = false;
$mpdf->watermark_font = 'DejaVuSansCondensed';
$mpdf->watermarkTextAlpha = 0.1;
$mpdf->SetDisplayMode('fullpage');
return $mpdf;
});
$this->app['mpdf.wrapper'] = $this->app->share(function ($app) {
return new PdfWrapper($app['mpdf.pdf']);
});
}
}
示例15: mPDF
<p>Razón social : ' . utf8_encode($t_solicitud->razon_social) . '</p>
<div style="text-align: lefth; font-style: italic;">
<img src="../qrcode/image.php?msg=Este es doocumento firmado electrónicamnete y podra ser usado en tiempo de vigencia no mayor a 6&err=M" alt="generation qr-code" style="border: solid 1px black;">
<p style="font-weight: bold; font-size: 7pt;">' . $t_nro . '</p>
</div>
</body>
</html>
';
//==============================================================
//==============================================================
//==============================================================
//==============================================================
//==============================================================
//==============================================================
define('_MPDF_PATH', '../');
include "../mpdf.php";
$mpdf = new mPDF('c', 'A4', '', '', 20, 15, 48, 25, 10, 10);
$mpdf->SetProtection(array('print'));
$mpdf->SetTitle("Solcitud de Producto no Contemplado");
$mpdf->SetAuthor("Servicio Ecuatoriano de Normalizacion INEN");
$mpdf->SetWatermarkText("Documento no oficial");
$mpdf->showWatermarkText = true;
$mpdf->watermark_font = 'Christian Miranda ';
$mpdf->watermarkTextAlpha = 0.1;
$mpdf->SetDisplayMode('fullpage');
$mpdf->WriteHTML($html);
$mpdf->Output();
exit;
exit;