本文整理汇总了PHP中mPDF::SetFooter方法的典型用法代码示例。如果您正苦于以下问题:PHP mPDF::SetFooter方法的具体用法?PHP mPDF::SetFooter怎么用?PHP mPDF::SetFooter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mPDF
的用法示例。
在下文中一共展示了mPDF::SetFooter方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: generate
/**
* Erzeugt ein PDF auf Basis der übergebenen Funktion.
* @param $module
* @param $action
* @param $param
* @param null $filename falls kein Dateiname angegeben wird, wird das PDF direkt im Browser ausgegeben
* @throws \Exception
*/
public static function generate($module, $action, $param, $filename = null, $template = true, $margin = 0)
{
$druckinhalt = new WrapperControl(null, 'druck');
$druckinhalt->setModule($module)->setAction($action)->addParams($param);
$pdf = new \mPDF('de-DE', 'A4');
$pdf->SetDisplayMode('fullpage');
// Zeigt eine ganze Seite an, wenn das PDF in Acrobat geöffnet wird
if ($margin > 0) {
$pdf->SetTopMargin($margin);
}
$pdf->SetFooter('Seite {PAGENO} / {nb}');
//file_get_contents('https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css') .
$stylesheet = file_get_contents('templates/print/css/default.css');
$pdf->WriteHTML($stylesheet, 1);
if ($template && file_exists('site/Print.template.html')) {
$vars = ['heading' => Application::getCurrentResponse()->getMetadata()->getHeading()];
$header = Parser::parse(null, null, $vars, file_get_contents('site/Print.template.html'));
$pdf->WriteHTML($header, 2);
}
$pdf->WriteHTML($druckinhalt->toHtml(), 2);
if ($filename === null) {
$pdf->Output($module . $action . '.pdf', 'I');
} else {
//$filename = Files::validateFilename($filename);
$pdf->Output($filename, 'F');
}
unset($pdf);
}
示例2: ActionCreatePDF
public function ActionCreatePDF($id)
{
$mpdf = Yii::app()->ePdf->mpdf();
$model_historia = $this->loadModel($id);
$model_historiaO_paciente = HistoriaObstetricia::model()->getHistoriasObstetriciaByPaciente($model_historia->paciente->id);
$model_historiaG_paciente = HistoriaGinecologia::model()->getHistoriasGinecologicasByPaciente($model_historia->paciente->id);
$historia = array($model_historiaG_paciente, $model_historiaO_paciente);
$stylesheet = file_get_contents('C:\\wamp\\www\\Gineobs\\themes\\hebo\\css\\pdfMain.css');
//configurando pdf general
$mpdf = new mPDF('utf-8', 'Letter-L');
//agregando header y footer
$mpdf->SetHeader('{DATE j-m-Y}||Recipe #' . $model_historia->paciente->id);
$mpdf->SetFooter('Dr. María Hernández|Ginecologia y obstetricia|{PAGENO}');
//Propiedades del PDF
$mpdf->setTitle("Historia Medica");
$mpdf->setAuthor("María Hernández");
$mpdf->setCreator("Edgar Cardona y Gabriela Soto");
$mpdf->setSubject("Historia medica de pacientes.");
$mpdf->setKeywords("Historia,Medicina");
//escribiendo CSS
$mpdf->WriteHTML($stylesheet, 1);
//Escribiendo PDF
$mpdf->writeHTML($this->renderPartial('historia', array('model' => $model_historia->paciente->id, 'historia' => $historia), true), 2);
//Salida
$mpdf->output("Recipe Medico", EYiiPdf::OUTPUT_TO_DOWNLOAD);
}
示例3: 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);
}
示例4: GerarPdf
public static function GerarPdf($html, $titulo = null, $paisagem = false, $nomePdf = null)
{
$mpdf = new mPDF();
$mpdf->allow_charset_conversion = true;
$mpdf->charset_in = 'utf-8';
if ($paisagem == true) {
$mpdf->CurOrientation = 'l';
}
//Exibir a pagina inteira no browser
//$mpdf->SetDisplayMode('fullpage');
//Cabeçalho: Seta a data/hora completa de quando o PDF foi gerado + um texto no lado direito
if ($titulo != null) {
$mpdf->SetHeader("{$titulo}");
}
//Rodapé: Seta a data/hora completa de quando o PDF foi gerado + um texto no lado direito
$mpdf->SetFooter("{DATE j/m/Y H:i}|{PAGENO}/{nb}| {$titulo}");
$mpdf->WriteHTML($html);
// define um nome para o arquivo PDF
if ($nomePdf == null) {
$nomePdf = time() . '.pdf';
}
$mpdf->Output($nomePdf, 'I');
}
示例5: pdf
function pdf($html, $filename = null, $cabecalho = '', $rodape = '')
{
require APPPATH . "helpers/mpdf/mpdf.php";
$mpdf = new mPDF();
//$mpdf->allow_charset_conversion=true;
$mpdf->charset_in = 'utf-8';
//Exibir a pagina inteira no browser
$mpdf->SetDisplayMode('fullpage');
//Cabeçalho: Seta a data/hora completa de quando o PDF foi gerado + um texto no lado direito
if ($cabecalho !== '') {
$mpdf->SetHeader('{DATE j/m/Y H:i}| | ' . $cabecalho);
}
//Rodapé: Seta a data/hora completa de quando o PDF foi gerado + um texto no lado direito
if ($rodape !== '') {
$mpdf->SetFooter($rodape);
}
$mpdf->WriteHTML($html);
// define um nome para o arquivo PDF
if ($filename == null) {
$filename = date("Y-m-d_his") . '_impressao.pdf';
}
$mpdf->Output($filename, 'I');
}
示例6: preDisplay
function preDisplay()
{
parent::preDisplay();
$tour = new Tour();
$html = file_get_contents("custom/modules/Tours/tpls/basic_pdf.tpl");
$html = str_replace("{NAME}", $this->bean->name, $html);
$desc = html_entity_decode_utf8($this->bean->description);
$desc = $tour->removeHtmlTags($desc);
$html = str_replace("{TOUR_NOTE}", $desc, $html);
$picture = '<img width="627" height="312" src="modules/images/' . $this->bean->picture . '">';
$html = str_replace("{PICTURE}", $picture, $html);
$html = str_replace("{CODE}", $this->bean->tour_code, $html);
$html = str_replace("{DURATION}", $this->bean->duration, $html);
$html = str_replace("{TRANSPORT}", $this->bean->transport2, $html);
$html = str_replace("{START_DATE}", $this->bean->start_date, $html);
$program = html_entity_decode_utf8($tour->get_data_to_export2pdf($_GET['record']));
$html = str_replace("{TOUR_PROGRAM_LINES}", $program, $html);
// Xuat ra pdf
$mpdf = new mPDF("vi");
$mpdf->SetFooter('{PAGENO}');
$mpdf->WriteHTML($html);
$mpdf->Output("Tour.pdf", "D");
exit;
}
示例7: gerarRelatorio
public function gerarRelatorio($data = NULL, $origem = NULL)
{
//verificando a sessao
$this->verificarSessao();
//iniciando o relatório
$mpdf = new mPDF('', '', 0, '', 15, 15, 35, 16, 9, 9, 'L');
//tamanho do pdf
$mpdf->SetDisplayMode('fullpage');
//cabeçalho
$mpdf->SetHeader('|Faculdade de Tecnologia Dom Amaury Castanho <br /> Av. Tiradentes, 1211 - Parque Industrial, Itu - SP, 13309-640 <br />(11) 4013-1872|');
//rodapé
$mpdf->SetFooter('|Página {PAGENO} de {nb}|www.fatecitu.edu.br');
switch ($origem) {
case 1:
$html = $this->load->view('relatorio/modelos/historicoAtivo_view', $data, true);
//titulo
$mpdf->SetTitle('Histórico do Ativo');
//conteúdo
$mpdf->WriteHTML($html);
//gerar pdf
$mpdf->Output('historicoDoAtivo.pdf', 'D');
break;
case 2:
$html = $this->load->view('relatorio/modelos/ativosPorLocal_view', $data, true);
//titulo
$mpdf->SetTitle('Ativos por Local');
//conteúdo
$mpdf->WriteHTML($html);
//gerar pdf
$mpdf->Output('ativosPorLocal.pdf', 'D');
break;
case 3:
//titulo
$mpdf->SetTitle('Relatório de Divergência');
$html = $this->load->view('relatorio/modelos/divergencia_view', $data, true);
$mpdf->WriteHTML($html);
//adicionando uma nova página
$mpdf->AddPage();
$html = $this->load->view('relatorio/modelos/ativosLocalErrado_view', $data, true);
$mpdf->WriteHTML($html);
//adicionando uma nova página
$mpdf->AddPage();
$html = $this->load->view('relatorio/modelos/ativoNaoEncontrado_view', $data, true);
$mpdf->WriteHTML($html);
//gerar pdf
$mpdf->Output('assets/docs/' . $data['id'] . '.pdf', 'F');
$mpdf->Output('relatorioDeDivergencia.pdf', 'D');
break;
}
redirect('ativo/carregarRelatorio');
}
示例8: mPDF
//==============================================================
//==============================================================
//==============================================================
include "../mpdf.php";
$mpdf = new mPDF('', 'A4', '', '', 32, 25, 27, 25, 16, 13);
$mpdf->mirrorMargins = 1;
$mpdf->SetDisplayMode('fullpage', 'two');
$mpdf->useOnlyCoreFonts = true;
$mpdf->defaultfooterfontsize = 13;
$mpdf->AddPage();
$mpdf->Image('clematis.jpg', 0, 0, 210, 297, 'jpg', '', true, false);
// e.g. the last "false" allows a full page picture
$mpdf->y = 70;
$mpdf->Shaded_box('mPDF Example File', 'Arial', '', 28, '70%', 'DF', 3, '#FFFFFF', '#000044', 10);
$mpdf->AddPage();
$mpdf->SetFooter('{PAGENO}');
$mpdf->WriteHTML($html);
$mpdf->AddPage('', 'NEXT-EVEN');
$mpdf->SetFooter();
$mpdf->SetAlpha(0.5);
$mpdf->Image('clematis.jpg', 0, 0, 210, 297, 'jpg', '', true, false);
// e.g. the last "false" allows a full page picture
$mpdf->SetAlpha(1);
$mpdf->writeBarcode('978-0-9542246-0-8', 1, 130, 230, 1, 0, 3, 3, 4, 4);
// Save the pages to a file
$mpdf->Output('test.pdf', 'F');
//==============================================================
//==============================================================
//==============================================================
//==============================================================
//==============================================================
示例9: mPDF
/*********************************************************************/
/*Generar el reporte del dia, todos los tours */
/* */
/*********************************************************************/
$hotel = $_GET['hotel'];
$table_header = "";
include "../mpdf/mpdf.php";
$mpdf = new mPDF(”);
//the table stylesheet
$stylesheet = file_get_contents('../mpdf/examples/mpdfstyletables.css');
$mpdf->WriteHTML($stylesheet, 1);
//$mpdf->useDefaultCSS2 = true;
//set header and footer to the pdf
$mpdf->SetHeader('{DATE j-m-Y h:i:s}| <h5>Operadora Zacatecas S.A de C.V<h5> |{PAGENO}');
$mpdf->SetFooter('|Operadora|');
$mpdf->WriteHTML('<br/>');
$texto = "ERROR: ";
//archivo de configuracion
include 'config.php';
$mysqli = new mysqli($hostdb, $usuariodb, $clavedb, $nombredb);
/* comprobar la conexión */
if (mysqli_connect_errno()) {
echo $texto . mysqli_connect_error();
/**printf("Falló la conexión: %s\n", mysqli_connect_error());**/
exit;
}
//Consultar todos los hoteles activos en la base de datos
//Esta consulta carga la clave de los hoteles
//$consulta = 'SELECT th.id_tour, t.nombre_tour, th.horario, t.numero_tour FROM tourhorario th, tours t WHERE th.id_tour = t.id_tour';
$consulta = "SELECT clave_hotel, nombre_hotel FROM institucion WHERE clave_hotel='" . $hotel . "'";
示例10: mPDF
$deduct = $totSetA - $totSetAB;
}
}
$outNum = "This is :{$totSetA} and This is :{$totSetAB}";
//$html.='<table style="font-size:14px" width="1015" border="0">
//<tr>
// <td width="48%">'.date('m/d/Y').' - Current Payment</td>
// <td width="52%" align="right">$-'.number_format($what[0],2).'</td>
//</tr>
//</table>';
$html .= '</td>
</tr>
</table>
<table style="font-family:Arial, Helvetica, sans-serif; font-size:18px;" width="1025" border="0">
<tr>
<td height="38" align="right">$' . number_format($deduct, 2) . '</td>
</tr>
</table><pagebreak/>
';
}
}
$mpdf = new mPDF();
$mpdf->SetHTMLHeader('');
$mpdf->SetFooter('');
$mpdf->WriteHTML($html);
$mpdf->Output();
//$mpdf->Output('filename.pdf','F');
exit;
//==============================================================
//==============================================================
//==============================================================
示例11: pdfReportAction
public function pdfReportAction(Request $request)
{
$html = $request->getSession()->get('pdf');
//$html = utf8_encode($html);
$mpdf = new \mPDF();
//$mpdf->WriteHTML('<pagebreak sheet-size="A5-L" />');
//$L = "L";
//$mpdf->_setPageSize("A4",$L);
$mpdf->defaultheaderfontsize = 10;
/* in pts */
$mpdf->defaultheaderfontstyle = B;
/* blank, B, I, or BI */
$mpdf->defaultheaderline = 1;
/* 1 to include line below header/above footer */
$mpdf->defaultfooterfontsize = 12;
/* in pts */
$mpdf->defaultfooterfontstyle = B;
/* blank, B, I, or BI */
$mpdf->defaultfooterline = 1;
/* 1 to include line below header/above footer */
$mpdf->SetHeader('{DATE j-m-Y}|{PAGENO}|Reportes SISCONEE');
$mpdf->SetFooter('{PAGENO}');
/* defines footer for Odd and Even Pages - placed at Outer margin */
$mpdf->WriteHTML($html);
$mpdf->Output();
exit;
}
示例12: download
public function download()
{
$data_id = $this->uri->segment(4);
$pembiayaan = $this->clients_pembiayaan_model->get_pembiayaan($data_id)->result();
$pembiayaan = $pembiayaan[0];
//print_r($pembiayaan);
$html = "";
$html .= '<style>
@page{ margin-top: 1cm; margin-bottom: 1cm; margin-left: 1cm; margin-right: 1cm;}
body, p{ font-family: Helvetica, Arial;font-size: 12px;line-height: 130%;}
.tbl{border-collapse: collapse;border: none;}
.tbl thead{border-bottom: 1px solid #000;}
.tbl td, .tbl th{padding: 3px;border: none;}
.clear{float: none;clear: both}
h2{ line-height: 130%; }
</style>';
$html .= "<div style=''>";
$html .= '<h2 align="center">PERNYATAAN PEMBIAYAAN<br/>"AL IJARAH (JASA) / AL HIWALAH (PENALANGAN)"<br/>KOPERASI AMARTHA INDONESIA</h2>';
$html .= '<hr/>';
$html .= '<p>Yang bertanda tangan di bawah ini :</p>';
$html .= '<table class="tbl">';
$html .= '<tr><td width="30px">1.</td><td width="80px">Nama</td><td width="250px"> : <b>' . $pembiayaan->officer_name . '</b></td><td width="80px"> </td><td width="200px"></td></tr>';
$html .= '<tr><td></td><td>Jabatan</td><td colspan="3"> : <b>Field Officer Amartha Indonesia</b></td></tr>';
$html .= '<tr><td></td><td colspan="4">Bertindak atas nama Koperasi Amartha Indonesia untuk selanjutnya Pihak Pertama</td></tr>';
$html .= '<tr><td></td><td colspan="4"> </td></tr>';
$html .= '<tr><td>2.</td><td>Nama</td><td> : <b>' . $pembiayaan->client_fullname . '</b></td><td>Majelis</td><td> : <b>' . $pembiayaan->group_name . '</b></td></tr>';
$html .= '<tr><td></td><td>Alamat</td><td> : <b>' . $pembiayaan->client_kampung . ', ' . $pembiayaan->client_desa . '' . $pembiayaan->client_kecamatan . '</b></td><td>Pekerjaan</td><td> : <b>' . $pembiayaan->client_job . '</b></td></tr>';
$html .= '<tr><td></td><td>No. KTP</td><td> : <b>' . $pembiayaan->client_ktp . '</b></td><td></td><td></td></tr>';
$html .= '<tr><td></td><td colspan="4">Dalam hal ini bertindak atas nama pribadi, selanjutnya dalam perjanjian ini disebut Pihak Kedua.</td></tr>';
$html .= '</table>';
$html .= '<br/>';
$html .= '<p>Menerangkan telah sepakat untuk membuat persetujuan aqad Al Ijaroh /Al Hiwalah sebagaimana tercantum di bawah ini :</p>';
$html .= '<table class="tbl">';
$html .= '<tr><td width="30px" valign="top">1.</td><td>Pihak Kedua mengajukan Pembiayaan untuk <b>' . $pembiayaan->data_keterangan . '</b> sebesar <b>Rp ' . number_format($pembiayaan->data_plafond) . '</b>.</td></tr>';
$html .= '<tr><td width="30px" valign="top">2.</td><td>Pihak Pertama bersedia memfasilitasi pengajuan Pihak Kedua untuk keperluan itu (butir 1) dan Pihak Pertama mewakilkan kepada Pihak Kedua untuk melakukan proses yang berkaitan dengan kepentingan sesuai butir 1 sebesar <b>Rp ' . number_format($pembiayaan->data_plafond) . '</b>.</td></tr>';
$html .= '<tr><td width="30px" valign="top">3.</td><td>Jangka waktu pembiayaan yang diberikan oleh Pihak Pertama kepada Pihak Kedua sebesar tersebut di atas telah disepakati kedua belah pihak selama 50 minggu.</td></tr>';
$html .= '<tr><td width="30px" valign="top">4.</td><td>Terhadap pembiayaan ini Pihak Kedua pada hakekatnya mengaku berhutang kepada Pihak Pertama dan semata-mata akan digunakan untuk keperluan sebagaimana yang tersebut dalam butir 1 (satu) di atas.</td></tr>';
$html .= '<tr><td width="30px" valign="top">5.</td><td>Atas pembiayaan tersebut, Pihak Kedua bersedia :</td></tr>';
$html .= '<tr><td width="30px"></td><td>';
$html .= '<table class="tbl">';
$html .= '<tr><td width="20px" valign="top">a)</td><td colspan="2">Memberikan ujrah kepada Pihak Pertama sebesar <b>Rp' . number_format($pembiayaan->data_margin) . '</b> yang akan diangsur selama 50 minggu sebesar <b>Rp' . number_format($pembiayaan->data_margin / 50) . '</b></td></tr>';
$html .= '<tr><td width="20px" valign="top">b)</td><td colspan="2">Melunasi hutang tersebut dengan cara membayar angsuran setiap minggu sebesar <b>Rp ' . number_format($pembiayaan->data_angsuranpokok + $pembiayaan->data_margin / 50 + 1000) . '</b>, dengan rincian sebagai berikut:</td></tr>';
$html .= '<tr><td width="20px"></td><td width="100px">Pokok </td><td width="">: <b>Rp ' . number_format($pembiayaan->data_angsuranpokok) . '</b></td></tr>';
$html .= '<tr><td width="20px"></td><td width="">Ujroh </td><td width="">: <b>Rp ' . number_format($pembiayaan->data_margin / 50) . '</b></td></tr>';
$html .= '<tr><td width="20px"></td><td width="">Tab Wajib </td><td width="">: <b>Rp ' . number_format(1000) . '</b></td></tr>';
$html .= '</table>';
$html .= '</td></tr>';
$html .= '<tr><td width="30px" valign="top">6.</td><td>Pihak Kedua bersedia membayar kepada Pihak Kesatu, biaya administrasi sebesar <b>Rp ' . number_format($pembiayaan->data_plafond * 1 / 100) . '</b></td></tr>';
$html .= "<tr><td width='30px' valign='top'>7.</td><td>Pihak Kedua dalam kedudukannya sebagai pengguna dana harus memenuhi syarat usaha ataupun keperluan yang dijalankan oleh Pihak Kedua hendaknya halal menurut syara' serta tidak bertentangan dengan undang-undang dan hukum yang berlaku.</td></tr>";
$html .= '<tr><td width="30px" valign="top">8.</td><td>Jika dikemudian hari ternyata terdapat kesalahan di dalam perjanjian ini dan atau terjadi perselisihan antara kedua belah pihak berkaitan dengan perjanjian ini akan di selesaikan dengan cara musyawarah mufakat yang dilandasi <i>ukhuwah islamiyyah</i>.</td></tr>';
$html .= '<tr><td width="30px"></td><td></td></tr>';
$html .= '</table>';
$html .= '<p>Demikian perjanjian ini disepakati dan ditandatangani pada hari ...................... tanggal ........................ di ........................</p>';
$html .= "<div align='center'><i>Walhamdulillaahirabbil'aalamiin</i></div>";
$html .= "</div>";
$html .= "<br/><br/>";
$html .= '<table class="tbl" width="200%">';
$html .= '<tr>';
$html .= '<td width="33%" align="center">Pihak Pertama<br/><br/><br/><br/><br/><br/>(' . $pembiayaan->officer_name . ')</td>';
$html .= '<td width="33%" align="center">Pihak Kedua<br/><br/><br/><br/><br/><br/>(' . $pembiayaan->client_fullname . ')</td>';
$html .= '<td width="33%" align="center">Ketua Majelis<br/><br/><br/><br/><br/><br/>(' . $pembiayaan->group_leader . ')</td>';
$html .= '</tr>';
$html .= '</table>';
//echo $html;
$filename = "AKAD_" . $pembiayaan->client_account;
$this->load->library('mpdf');
$mpdf = new mPDF('utf-8', 'A4');
$mpdf->SetFooter("Top Sheet" . '||{PAGENO}|');
$mpdf->WriteHTML($html);
$pdfFilePath = FCPATH . "downloads/topsheet/{$filename}.pdf";
$pdffile = base_url() . "downloads/topsheet/{$filename}.pdf";
$mpdf->Output($pdfFilePath, 'F');
redirect($pdffile, 'refresh');
}
示例13: download_aruskas
//.........这里部分代码省略.........
<td align="right"></td>
<td> </td>
<td align="right"></td>
<td align="right"><br/><b><i>Cash Flow From Investment Operating</i></b></td>
</tr>';
$laporan .= '<tr>
<td align="left" >Penambahan Aset Tetap</td>
<td align="right">' . ($penambahan_aset_tetap_actual < 0 ? "(" . number_format(abs($penambahan_aset_tetap_actual)) . ")" : number_format($penambahan_aset_tetap_actual)) . '</td>
<td> </td>
<td align="right">' . ($penambahan_aset_tetap_before < 0 ? "(" . number_format(abs($penambahan_aset_tetap_before)) . ")" : number_format($penambahan_aset_tetap_before)) . '</td>
<td align="right"><i>Acquisition of Fixed Assets</i></td>
</tr>';
$laporan .= '<tr>
<td align="left" >Penambahan Aset Lain</td>
<td align="right" style="border-bottom: 1px solid #000;">' . ($penambahan_aset_lain_actual < 0 ? "(" . number_format(abs($penambahan_aset_lain_actual)) . ")" : number_format($penambahan_aset_lain_actual)) . '</td>
<td> </td>
<td align="right" style="border-bottom: 1px solid #000;">' . ($penambahan_aset_lain_before < 0 ? "(" . number_format(abs($penambahan_aset_lain_before)) . ")" : number_format($penambahan_aset_lain_before)) . '</td>
<td align="right"><i>Acquisition of Other Assets</i></td>
</tr>';
$laporan .= '<tr>
<td align="left" >Arus kas bersih dari aktivitas investasi</td>
<td align="right" style="border-bottom: 1px solid #000;">' . ($arus_kas_investasi_actual < 0 ? "(" . number_format(abs($arus_kas_investasi_actual)) . ")" : number_format($arus_kas_investasi_actual)) . '</td>
<td> </td>
<td align="right" style="border-bottom: 1px solid #000;">' . ($arus_kas_investasi_actual < 0 ? "(" . number_format(abs($arus_kas_investasi_actual)) . ")" : number_format($arus_kas_investasi_actual)) . '</td>
<td align="right"><i>Net cash flow from investment activities</i></td>
</tr>';
$laporan .= '<tr>
<td align="left" ><br/><b>Arus Kas Dari Aktivitas Pendanaan</b></td>
<td align="right"></td>
<td> </td>
<td align="right"></td>
<td align="right"><br/><b><i>Cash Flow From Financing Operating</i></b></td>
</tr>';
$laporan .= '<tr>
<td align="left" >Penambahan (Pengurangan) Simpanan</td>
<td align="right">' . ($penambahan_simpanan_actual < 0 ? "(" . number_format(abs($penambahan_simpanan_actual)) . ")" : number_format($penambahan_simpanan_actual)) . '</td>
<td> </td>
<td align="right">' . ($penambahan_simpanan_before < 0 ? "(" . number_format(abs($penambahan_simpanan_before)) . ")" : number_format($penambahan_simpanan_before)) . '</td>
<td align="right"><i>Increase (Decrease) Savings</i></td>
</tr>';
$laporan .= '<tr>
<td align="left" >Penambahan (Pengurangan) Hibah</td>
<td align="right">' . ($penambahan_hibah_actual < 0 ? "(" . number_format(abs($penambahan_hibah_actual)) . ")" : number_format($penambahan_hibah_actual)) . '</td>
<td> </td>
<td align="right">' . ($penambahan_hibah_before < 0 ? "(" . number_format(abs($penambahan_hibah_before)) . ")" : number_format($penambahan_hibah_before)) . '</td>
<td align="right"><i>Increase (Decrease) Grants</i></td>
</tr>';
$laporan .= '<tr>
<td align="left" >Penambahan (Pengurangan) Modal Penyertaan</td>
<td align="right" style="border-bottom: 1px solid #000;">' . ($penambahan_modal_actual < 0 ? "(" . number_format(abs($penambahan_modal_actual)) . ")" : number_format($penambahan_modal_actual)) . '</td>
<td> </td>
<td align="right" style="border-bottom: 1px solid #000;">' . ($penambahan_modal_before < 0 ? "(" . number_format(abs($penambahan_modal_before)) . ")" : number_format($penambahan_modal_before)) . '</td>
<td align="right"><i>Increase (Decrease) Capital Participations</i></td>
</tr>';
$laporan .= '<tr>
<td align="left" >Arus kas bersih dari aktivitas pendanaan</td>
<td align="right" style="border-bottom: 1px solid #000;">' . ($arus_kas_pendanaan_actual < 0 ? "(" . number_format(abs($arus_kas_pendanaan_actual)) . ")" : number_format($arus_kas_pendanaan_actual)) . '</td>
<td> </td>
<td align="right" style="border-bottom: 1px solid #000;">' . ($arus_kas_pendanaan_before < 0 ? "(" . number_format(abs($arus_kas_pendanaan_before)) . ")" : number_format($arus_kas_pendanaan_before)) . '</td>
<td align="right"><i>Net cash flow from investment financing</i></td>
</tr>';
$laporan .= '<tr>
<td align="left" ><br/><b>Kenaikan (penurunan) bersih kas dan setara kas</b></td>
<td align="right">' . ($selisih_kas_actual < 0 ? "(" . number_format(abs($selisih_kas_actual)) . ")" : number_format($selisih_kas_actual)) . '</td>
<td> </td>
<td align="right">' . ($selisih_kas_before < 0 ? "(" . number_format(abs($selisih_kas_before)) . ")" : number_format($selisih_kas_before)) . '</td>
<td align="right"><br/><b><i>Net increase (decrease) in cash and cash equivalent</i></b></td>
</tr>';
$laporan .= '<tr>
<td align="left" ><br/><b>Kas dan setara kas awal tahun</b></td>
<td align="right" style="border-bottom: 1px solid #000;">' . ($kas_awal_tahun_actual < 0 ? "(" . number_format(abs($kas_awal_tahun_actual)) . ")" : number_format($kas_awal_tahun_actual)) . '</td>
<td> </td>
<td align="right" style="border-bottom: 1px solid #000;">' . ($kas_awal_tahun_before < 0 ? "(" . number_format(abs($kas_awal_tahun_before)) . ")" : number_format($kas_awal_tahun_before)) . '</td>
<td align="right"><br/><b><i>Cash and cash equivalent at beginning of year</i></b></td>
</tr>';
$laporan .= '<tr>
<td align="left" ><br/><b>Kas dan setara kas akhir tahun</b></td>
<td align="right" style="border-bottom: 2px solid #000;">' . ($kas_akhir_tahun_actual < 0 ? "(" . number_format(abs($kas_akhir_tahun_actual)) . ")" : number_format($kas_akhir_tahun_actual)) . '</td>
<td> </td>
<td align="right" style="border-bottom: 2px solid #000;">' . ($kas_akhir_tahun_before < 0 ? "(" . number_format(abs($kas_akhir_tahun_before)) . ")" : number_format($kas_akhir_tahun_before)) . '</td>
<td align="right"><br/><b><i>Cash and cash equivalent at end of year</i></b></td>
</tr>';
$laporan .= '</table>';
$html .= $laporan;
$this->load->library('mpdf');
$mpdf = new mPDF('utf-8', 'A4-L');
$mpdf->SetHeader("Amartha Microfinance" . '||' . $tgl . '|');
$mpdf->SetFooter("Laporan Arus Kas" . '||{PAGENO}|');
$mpdf->WriteHTML($html);
//echo $html;
//$this->mpdf->Output();
$pdfFilePath = FCPATH . "downloads/aruskas/{$filename}.pdf";
$pdffile = base_url() . "downloads/aruskas/{$filename}.pdf";
$mpdf->Output($pdfFilePath, 'F');
redirect($pdffile, 'refresh');
} else {
//If no session, redirect to login page
redirect('login', 'refresh');
}
}
示例14: export
public function export($id)
{
if (empty($id)) {
$this->load->helper('url');
redirect('/', 'refresh');
}
$filename = time();
$pdfFilePath = FCPATH . "/assets/downloads/{$filename}.pdf";
if (file_exists($pdfFilePath) == FALSE) {
ini_set('memory_limit', '32M');
$html = $this->view($id, true);
$pdf = new mPDF();
$pdf->SetFooter($_SERVER['HTTP_HOST'] . '|{PAGENO}|' . date(DATE_RFC822));
//
$pdf->WriteHTML($html);
$pdf->Output($pdfFilePath, 'F');
}
$this->load->helper('download');
$data = file_get_contents($pdfFilePath);
$name = 'article_' . $id . '.pdf';
force_download($name, $data);
}
示例15: actionExportPdf
public function actionExportPdf()
{
//$searchModel = new SecuritasSearch();
//$dataProvider = $searchModel->search(Yii::$app->request->queryParams);
$session = Yii::$app->session;
$dataProvider = $session->get('dataProvider');
$html = $this->renderPartial('_pdf', ['dataProvider' => $dataProvider]);
//function mPDF($mode='',$format='A4',$default_font_size=0,$default_font='',$mgl=15,$mgr=15,$mgt=16,$mgb=16,$mgh=9,$mgf=9, $orientation='P') {
$mpdf = new \mPDF('c', 'A4-L', 0, '', 15, 10, 15, 10, 10, 10);
$header = ['L' => [], 'C' => [], 'R' => ['content' => 'Page {PAGENO} of {nbpg}', 'font-family' => 'sans', 'font-style' => '', 'font-size' => '9'], 'line' => 1];
$mpdf->SetFooter($header, 'O');
$mpdf->SetDisplayMode('fullpage');
$mpdf->list_indent_first_level = 0;
// 1 or 0 - whether to indent the first level of a list
$mpdf->WriteHTML($html);
$mpdf->Output($this->id . '_' . date('YmdHis') . '.pdf', 'D');
exit;
}