本文整理汇总了PHP中mPDF::SetAuthor方法的典型用法代码示例。如果您正苦于以下问题:PHP mPDF::SetAuthor方法的具体用法?PHP mPDF::SetAuthor怎么用?PHP mPDF::SetAuthor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mPDF
的用法示例。
在下文中一共展示了mPDF::SetAuthor方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: basicMPdfConfiguration
protected function basicMPdfConfiguration(\mPDF $mPDF)
{
$mPDF->biDirectional = false;
$mPDF->useSubstitutions = false;
$mPDF->simpleTables = true;
$mPDF->SetAuthor($this->documentAuthor);
$mPDF->SetDisplayMode('default', 'continuous');
}
示例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: 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;
}
}
示例4: 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----------
}
示例5: 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']);
});
}
示例6: 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);
});
}
示例7: mpdf
static public function mpdf( $html_path, $pdf_path, $css_rel_path, $format = 'A4', $download = false) {
// reporting komplett abschalten
$error_reporting = error_reporting();
error_reporting(0);
ProjectConfiguration::registerMPDF();
$mpdf=new mPDF('ch-DE',$format,'8','DejaVuSansCondensed',15,15,30,15,10,10);
$mpdf->packTableData = true;
//$mpdf->debug = true;
$mpdf->SetDisplayMode('fullpage');
$mpdf->defaultfooterfontstyle='';
$mpdf->defaultfooterfontsize='8';
$mpdf->SetFooter(basename($pdf_path).'|Stand: {DATE j.m.Y H:i}|Seite {PAGENO}/{nbpg}');
$mpdf->list_indent_first_level = 0; // 1 or 0 - whether to indent the first level of a list
$mpdf->shrink_tables_to_fit=1;
// LOAD a stylesheet
#$stylesheet = file_get_contents(sfConfig::get('sf_web_dir').'/css/backend/pdf/class_etat.css');
$stylesheet = file_get_contents(sfConfig::get('sf_web_dir').'/css/'.$css_rel_path);
$mpdf->WriteHTML($stylesheet,1); // parameter 1 indicates this is css
$html = file_get_contents($html_path);
$mpdf->WriteHTML($html,2);
//$mpdf->SetTitle();
$mpdf->SetAuthor('');
$mpdf->SetCreator('rockstep');
if ($download) {
$mpdf->Output( $pdf_path, 'I');
} else {
$mpdf->Output( $pdf_path, 'F');
}
error_reporting($error_reporting);
}
示例8: 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']);
});
}
示例9: 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;
}
示例10: 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']);
});
}
}
示例11: get_payment_area
public function get_payment_area()
{
$start_date = $this->input->get_post('start_date');
$end_date = $this->input->get_post('end_date');
$this->data['payment_info'] = $this->report->getDepotToAllCustomerPaymentReport($this->ion_auth->get_user_id(), $start_date, $end_date);
if ($this->input->is_ajax_request()) {
$this->load->view(BACKEND . '/report/payment/generate', $this->data);
} else {
//load mPDF library
$this->load->library('m_pdf');
$pdf = $this->m_pdf->load();
$mpdf = new mPDF('c', 'A4', '', '', 20, 15, 38, 25, 10, 10);
$mpdf->SetProtection(array('print'));
$mpdf->SetTitle("Walart Pharmaceutical. - Payment Report");
$mpdf->SetAuthor("Walart Pharmaceutical.");
$mpdf->SetDisplayMode('fullpage');
$header = $this->load->view(BACKEND . '/report/payment/generate/header', $this->data, true);
$footer = $this->load->view(BACKEND . '/report/payment/generate/footer', $this->data, true);
$html = $this->load->view(BACKEND . '/report/payment/generate', $this->data, true);
$mpdf->SetHTMLHeader($header);
$mpdf->SetHTMLFooter($footer);
$mpdf->WriteHTML($html);
$mpdf->Output($pdfFilePath, "D");
}
}
示例12: strlen
mysql_query("SET NAMES 'utf8'");
$row = mysql_fetch_array($res);
//NUMERO FACTURA
$numi = "";
$largura = strlen($row['numero']);
for ($xz = $largura; $xz < 5; $xz++) {
$numi .= "0";
}
$numpresupuesto = "SN-" . $numi . $row['numero'] . "/" . substr($row['fecha'], 0, 4);
include "../includes/mpdf60/mpdf.php";
$mpdf = new mPDF('win-1252', 'A4', '', '', 0, 0, 30, 25, 0, 0);
$mpdf->useOnlyCoreFonts = true;
// false is default
$mpdf->SetProtection(array('print'));
$mpdf->SetTitle("EMPRESA - Presupuesto");
$mpdf->SetAuthor("EMPRESA");
$mpdf->SetWatermarkText("PRESUPUESTO");
$mpdf->showWatermarkText = true;
$mpdf->watermark_font = 'DejaVuSansCondensed';
$mpdf->watermarkTextAlpha = 0.05;
$mpdf->SetDisplayMode('fullpage');
/*CABECERA Y ESTILOS*/
$html = "\n<html>\n\t<head>\n\t\t<style>\n\t\t\tbody{\n\t\t\t\t/*font-family: sans-serif;*/\n\t\t\t\tfont-family: DejaVuSansCondensed;\n \t\t\tfont-size: 10pt;\n\t\t\t}\n\t\t\t.cabecera,\n\t\t\t.cliente,\n\t\t\t.contenido,\n\t\t\t.row{\n\t\t\t\tpadding: 0px 20px 0px 20px;\n\t\t\t}\n\t\t\t.cabecera{padding-top: 15px;}\n\t\t\t.cliente{padding:5px 50px;}\n\t\t\t.contenido{padding: 0px 35px;}\n\t\t\t.pie{\n\t\t\t\tbackground: #E5008F;\n\t\t\t\tcolor: #FFFFFF;\n\t\t\t\tfont-size: 10px;\n\t\t\t\ttext-align: center;\n\t\t\t\tpadding: 10px; \n\t\t\t}\n\t\t\thr{\n\t\t\t\tcolor: #E5008F;\n\t\t\t\tbackground-color: #E5008F;\n\t\t\t\theight: 1px;\n\t\t\t}\n\t\t\tp{\n\t\t\t\tmargin: 0px;\n\t\t\t}\n\t\t\tspan.icono{font-size: 14px;}\n\t\t\ttd{\n\t\t\t\tvertical-align: top;\n\t\t\t}\n\t\t\t.items td\n\t\t\t{\n \t\t\tborder-left: 0.1mm solid #000000;\n \t\t\tborder-right: 0.1mm solid #000000;\n\t\t\t}\n\t\t\t.items td.zebra{\n\t\t\t\tbackground: #EEE;\n\t\t\t}\n\t\t\t.items td.titulor{\n\t\t\t\tbackground: #E5008F;\n\t\t\t\tcolor: #FFF;\n\t\t\t}\n\t\t\t.items td.blanktotal\n\t\t\t{\n \t\t\tbackground-color: #FFFFFF;\n \t\t\tborder: 0mm none #000000;\n \t\t\tborder-top: 0.1mm solid #000000;\n \t\t\tborder-right: 0.1mm solid #000000;\n\t\t\t}\n\t\t\ttable thead td\n\t\t\t{\n\t\t\t\tbackground-color: #EEE;\n \t\t\ttext-align: center;\n \t\t\tborder: 0.1mm solid #000000;\n\t\t\t}\t\t\t\n\t\t\ttd.totals\n\t\t\t{\n \t\t\ttext-align: right;\n \t\t\tbackground: #EEE;\n \t\t\tborder: 0.1mm solid #000000;\n\t\t\t}\n\t\t\t.lateral {\n\t\t\t\tposition: absolute; \n\t\t\t\toverflow: auto; \n\t\t\t\tleft: 0;\n\t\t\t\tbottom: 20mm; \n\t\t\t\twidth: 250mm; \n\t\t\t\tpadding: 10px 0px 0px 0px; \n\t\t\t\tfont-family:sans; \n\t\t\t\tmargin: 0px;\n\t\t\t\trotate: -90;\n\t\t\t\ttext-align: center;\n\t\t\t\tfont-size: 8px;\n\t\t\t}\n\t\t\t.email{color:#FFF; text-decoration: none;}\n\t\t\t.paginador{text-align: right; font-size: 8px;}\n\t\t</style>\n\t</head>";
//DEFINICION CABECERA Y PIE
$html .= '
<body>
<!--mpdf
<htmlpageheader name="myheader">
<div class="cabecera">
<table width="100%">
<tr>
示例13: substr
<?php
# THIS ONE DOES NOT HAVE AddPageByArray ANY MORE :-)
include "../mpdf.php";
$html_data = file_get_contents("body.html");
$html = substr($html_data, 12, strlen($html_data) - 27);
$style_data = file_get_contents("style_setheader.css");
$frontmatter_data = file_get_contents("frontmatter_setheader.html");
// Create new PDF with font subsetting, 234mm wide, 297mm high
$mpdf = new mPDF('s', array(234, 297));
// Make it DOUBLE SIDED document with 4mm bleed
$mpdf->mirrorMargins = 1;
$mpdf->bleedMargin = 4;
$mpdf->h2toc = array();
$mpdf->WriteHTML($style_data, 1);
$mpdf->WriteHTML($frontmatter_data, 2);
$mpdf->WriteHTML($html, 2);
$mpdf->SetTitle("An Example Title");
$mpdf->SetAuthor("Aco");
$mpdf->SetCreator("Booktype 2.0 and mPDF 6.0");
$mpdf->Output();
?>
示例14: generate
public function generate($payment_id)
{
$this->data['payment_id'] = $payment_id;
$payment_info = $this->payment->getPayment($payment_id);
if ($payment_info) {
if ($this->ion_auth->is_customer() || $this->input->get_post('view') == 'customer') {
$user_id = $payment_info->retailer_id;
} else {
$user_id = $payment_info->depot_id;
}
$this->data['payment_info'] = $payment_info;
$user_info = $this->ion_auth->getSimbanicUser($user_id);
$this->data['user_info'] = $user_info;
$invoice_month = date("M", strtotime($payment_info->confirm_date));
$pdfFilePath = $invoice_month . '_' . $user_info->full_name . '_' . $user_info->customer_id . '_' . $payment_info->id . ".pdf";
//load mPDF library
$this->load->library('m_pdf');
$pdf = $this->m_pdf->load();
$mpdf = new mPDF('c', 'A4', '', '', 20, 15, 38, 25, 10, 10);
$mpdf->SetProtection(array('print'));
$mpdf->SetTitle("Walart Pharmaceutical. - Payment Receipt");
$mpdf->SetAuthor("Walart Pharmaceutical.");
$mpdf->SetDisplayMode('fullpage');
$header = $this->load->view(BACKEND . '/payment/generate/header', $this->data, true);
$footer = $this->load->view(BACKEND . '/payment/generate/footer', $this->data, true);
$html = $this->load->view(BACKEND . '/payment/generate', $this->data, true);
$mpdf->SetHTMLHeader($header);
$mpdf->SetHTMLFooter($footer);
$mpdf->WriteHTML($html);
$mpdf->Output($pdfFilePath, "D");
} else {
redirect_backend_url('invoice');
}
}
示例15: renderPDF
//.........这里部分代码省略.........
<table class="table table-bordered items" width="100%" style="width:700px; margin:0 auto;font-size: 13pt; border-collapse: collapse; ">
<thead>
<tr>
<th style=" border-top:0"></th>
<td style=" border-top:0"></td>
<th style=" text-align:right; border-top:0;padding-bottom:10px;padding-right:5px;">Receipt</th>
</tr>
</thead>
<tbody>
<tr >
<td style="padding-top:30px;padding-left:5px;"><strong>Billed to:</strong></td>
<td style="padding-top:30px;"></td>
<td style="text-align:right;padding-top:30px;line-height:25px;padding-right:5px;"><strong>Receipt Date:</strong> ' . date('M d, Y', strtotime($txData['Transaction']['created'])) . '<br>
</td>
</tr>
<tr style="border:none;">
<td style="padding-top:2px;"></td>
<td style="padding-top:2px;"></td>
<td style="padding-top:2px;"></td>
</tr>
<tr style="border:none;">
<td class="bt" style="padding-left:5px;">' . $txData['BusinessOwner']['email'] . '<br>
' . $txData['BusinessOwner']['fname'] . ' ' . $txData['BusinessOwner']['lname'] . '<br>';
if (!empty($txData['BusinessOwner']['address'])) {
$html .= ucfirst($txData['BusinessOwner']['address']);
}
if ($txData['BusinessOwner']['address'] != '' && $txData['BusinessOwner']['city'] != '') {
$html .= ', ';
}
if (!empty($txData['BusinessOwner']['city'])) {
$html .= ucfirst($txData['BusinessOwner']['city']);
}
$html .= '
</td>
<td class="bt"></td>
<td class="bt"></td>
</tr>
<tr style="border:none;border-bottom:1px solid #ddd;">
<td class="bt" style="padding-bottom:10px;padding-left:5px;">' . $txData['State']['state_subdivision_name'] . ' ' . $txData['BusinessOwner']['zipcode'] . '<br>
' . $txData['Country']['country_name'] . '
</td>
<td class="bt"></td>
<td class="bt"></td>
</tr>
<tr>
<th style="text-align:left;padding-bottom:20px;padding-left:5px;width:40%;">Membership Plan</th>
<th style="text-align:left;padding-bottom:20px;width:20%;">Discount</th>
<th style="text-align:right;padding-bottom:20px;width:40%;padding-right:5px;">Price</th>
</tr>
<tr>
<td style="padding-bottom:40px;padding-left:5px;padding-left:5px;padding-right:5px;">' . ucfirst($txData['Transaction']['group_type']) . '</td>
<td style="padding-bottom:40px;padding-right:5px;">$' . $discounts . '</td>
<td style="text-align:right;padding-bottom:40px;padding-right:5px;">$49.99</td>
</tr>
<tr>
<td></td>
<td></td>
<td style="text-align:right;line-height:25px;"><b>Total: $' . $amountPaid . '</b> </td>
</tr>
</tbody>
</table>
</body>
</html>';
$mpdf = new mPDF('c', 'A4', '', '', 15, 15, 30, 25, 10, 10);
$mpdf->SetProtection(array('print'));
$mpdf->SetTitle("FOXHOPR - Invoice");
$mpdf->SetAuthor("FOXHOPR");
$mpdf->SetDisplayMode('fullpage');
/*$mpdf->SetWatermarkText('PAID');
$mpdf->watermark_font = 'DejaVuSansCondensed';*/
$mpdf->showWatermarkImage = true;
$mpdf->SetWatermarkImage('http://10.10.12.69/foxhopr_testing/img/watermark.jpg', 0.15, 'F');
//$mpdf->showWatermarkText = true;
$mpdf->WriteHTML($html);
$mpdf->Output();
exit;
} else {
$this->Session->setFlash('Invalid Transaction ID', 'Front/flash_bad');
$this->redirect(array('action' => 'purchaseReceipts'));
}
} else {
$this->Session->setFlash('Invalid Transaction ID', 'Front/flash_bad');
$this->redirect(array('action' => 'purchaseReceipts'));
}
}