//$pdf->SetSubject("Training nr. ".$training->number." - ".api_timestampFormat($request->timestamp,api_text("date")));
// header and footer
$pdf->setPrintHeader(true);
$pdf->setPrintFooter(true);
// set margins
$pdf->SetMargins(10, 30, 10);
$pdf->SetHeaderMargin(30);
$pdf->SetFooterMargin(10);
// set auto page breaks
$pdf->SetAutoPageBreak(TRUE, 15);
// set font
$pdf->SetFont('freesans', '', 12, '', true);
// add a page
$pdf->AddPage();
// page styles
$pdf->SetTextColor(0);
$pdf->SetFillColor(245);
$fill = FALSE;
// border
$border = '';
// header
$pdf->SetFont('freesans', '', 8, '', true);
$pdf->Cell(25, 3, mb_strtoupper(api_text("module-diary_export-sport"), 'UTF-8'), $border, 0, 'L', false);
$pdf->Cell(25, 3, mb_strtoupper(api_text("module-diary_export-sort"), 'UTF-8'), $border, 0, 'L', false);
$pdf->Cell(35, 3, mb_strtoupper(api_text("module-diary_export-time"), 'UTF-8'), $border, 0, 'L', false);
$pdf->Cell(25, 3, mb_strtoupper(api_text("module-diary_export-distance"), 'UTF-8'), $border, 0, 'L', false);
$pdf->Cell(130, 3, mb_strtoupper(api_text("module-diary_export-description"), 'UTF-8'), $border, 0, 'L', false);
$pdf->Cell(0, 3, mb_strtoupper(api_text("module-diary_export-datetraining"), 'UTF-8'), $border, 0, 'L', false);
$pdf->Ln();
//Colora dettagli blu
$pdf->SetTextColor(0, 0, 255);
示例#2
0
//---------------------------------
$tbl = <<<EOD
<table border="1"  cellpadding="0" cellspacing="1" align="center" fontsize="14">
<tr>
<td></td><td><br /><br /><br /><br /></td>
</tr>
<tr>
<th colspan="2"><h1>Estructura Programática</h1></th>
</tr>
</table>
EOD;
$pdf->writeHTML($tbl, true, false, false, false, '');
$pdf->Ln();
$pdf->SetLineStyle(array('width' => 0.0, 'cap' => 'butt', 'join' => 'miter', 'dash' => 4, 'color' => array(255, 0, 0)));
$pdf->SetFillColor(255, 255, 128);
$pdf->SetTextColor(0, 0, 128);
$pdf->Ln();
$tbl = <<<EOD
<table border="1"  cellpadding="1" cellspacing="1" align="center" fontsize="12">
<tr>
<th colspan="1">ID</th>
<th colspan="1">CLAVE</th>
<th colspan="1">DESCRIPCIÓN</th>
<th colspan="1">TIPO</th>
</tr>
</table>
EOD;
$pdf->writeHTML($tbl, true, false, false, false, '');
$pdf->Ln();
//<td>{$value['id']}</td>
$tbl = '<table border="1"  cellpadding="0" cellspacing="3" align="center" fontsize="10">';
示例#3
0
 $pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
 //set margins
 $pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
 $pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
 $pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
 //set auto page breaks
 $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
 //set image scale factor
 $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
 //set some language-dependent strings
 //$pdf->setLanguageArray($l);
 // ---------------------------------------------------------
 $pdf->SetFont('times', 'B', 17);
 // add a page
 $pdf->AddPage();
 $pdf->SetTextColor(190);
 $pdf->SetY(5);
 $pdf->Write(10, 'Facture ' . $id_ventes . ' ', '', 0, 'R', true);
 /*écriture "ACQUITTEE"
 if ($donnees['paiement']==1){
 $pdf->SetFont('times', '', 49);
 $pdf->SetY(10);
 $pdf->SetTextColor(250,0,0);
 $pdf->Write(10, 'ACQUITTE','',0, 'R',true);
 }
 */
 $pdf->SetFont('times', '', 9);
 $pdf->SetY(30);
 $pdf->SetTextColor(0);
 // set columns width
 $first_column_width = 100;
示例#4
0
    public function actionCetaklaporan($tgl_awal, $tgl_akhir, $toko, $status)
    {
        $criteria = new CDbCriteria();
        if (!empty($tgl_awal) && empty($tgl_akhir)) {
            $criteria->condition = "TGL_PENGADAAN>='{$tgl_awal}'";
        } else {
            if (empty($tgl_awal) && !empty($tgl_akhir)) {
                $criteria->condition = "TGL_PENGADAAN<='{$tgl_akhir}'";
            } else {
                if (!empty($tgl_awal) && !empty($tgl_akhir)) {
                    $criteria->condition = "TGL_PENGADAAN>='{$tgl_awal}' and TGL_PENGADAAN<='{$tgl_akhir}'";
                }
            }
        }
        $criteria->compare('NAMA_TOKO', $toko, true);
        $criteria->compare('STATUS', $status);
        $model = Pengadaan::model()->findAll($criteria);
        $pdf = new MYPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
        spl_autoload_register(array('YiiBase', 'autoload'));
        $pdf->SetCreator(PDF_CREATOR);
        $pdf->SetTitle("Laporan Rekap Pengadaan");
        $pdf->setHeaderFont(array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
        $pdf->setFooterFont(array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
        $pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
        $pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
        $pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
        $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
        $pdf->SetFont('helvetica', '', 8);
        $pdf->SetTextColor(80, 80, 80);
        $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
        $pdf->AddPage();
        $pdf->setJPEGQuality(75);
        $html = <<<EOD
\t\t<h1 align="center">LAPORAN PENGADAAN</h1>
\t\t<table align="left" border="1" cellpadding="2" cellspacing="0" vertical-align="middle">
\t\t\t<tbody>
\t\t\t\t<tr>
\t\t\t\t\t<td width="40" align="center">NO</td>
\t\t\t\t\t<td width="75" align="center">Nomor PO</td>
\t\t\t\t\t<td width="65" align="center">Tanggal Pengadaan</td>
\t\t\t\t\t<td width="175" align="center">Permintaan</td>
\t\t\t\t\t<td width="75" align="center">Nama Toko</td>
\t\t\t\t\t<td width="75" align="center">Harga Total</td>
\t\t\t\t\t<td width="125" align="center">Status</td>
\t\t\t\t</tr>
EOD;
        $no_urut = 0;
        foreach ($model as $mod) {
            $no_urut++;
            $tgl_peng = "";
            if ($mod->TGL_PENGADAAN != "0000-00-00") {
                $tgl_peng = date("d-M-y", strtotime($mod->TGL_PENGADAAN));
            } else {
                $tgl_peng = '-';
            }
            $html .= <<<EOD
\t\t\t\t<tr>
\t\t\t\t\t<td width="40" align="center">{$no_urut}</td>
\t\t\t\t\t<td width="75" align="center">{$mod->NO_PO}</td>
\t\t\t\t\t<td width="65" align="center">{$tgl_peng}</td>
\t\t\t\t\t<td width="175" align="center">{$mod->PERMINTAAN}</td>
\t\t\t\t\t<td width="75" align="center">{$mod->NAMA_TOKO}</td>
\t\t\t\t\t<td width="75" align="center">{$mod->HARGA_TOTAL}</td>
\t\t\t\t\t<td width="125" align="center">{$mod->STATUS}</td>
\t\t\t\t</tr>
EOD;
        }
        $html .= <<<EOD
\t\t\t</tbody>
\t\t</table>
EOD;
        $pdf->writeHTMLCell(0, 0, '', '', $html, 0, 1, 0, true, '', true);
        $filename = Yii::getPathOfAlias('webroot') . '/laporan/pengadaan/rekap pengadaan tanggal ' . date('d-M-y') . '.pdf';
        $pdf->Output($filename, 'F');
        //Yii::app()->end();
        $this->redirect(Yii::app()->request->baseUrl . '/laporan/pengadaan/rekap pengadaan tanggal ' . date('d-M-y') . '.pdf');
    }
示例#5
0
// <tbody>
// <tr>
// <td>Yukarıda ismi geçen kişilerden belirtilen MYK Mesleki Yeterlilik Belgesi sınav ücretlerin tahsil edildiğini, iş bu ücretlerin doğruluğunu ve kayıt altına alındığını taahhüt ederim.</td>
// </tr>
// <tr style="text-align:center">
// <td>../../....</td>
// </tr>
// <tr style="text-align:center">
// <td>İmza</td>
// </tr>
// <tr style="text-align:center">
// <td><strong>'.$this->tesvik['IMZA_UNVAN'].'</strong></td>
// </tr>
// <tr style="text-align:center">
// <td>'.$this->tesvik['IMZA_ISIM'].'</td>
// </tr>
// </tbody>
// </table>';
// $pdf->SetFont('DejaVuSans', '', 12, '', true);
// $pdf->writeHTMLCell(0, 0, '', '', $ImzaTable, 0, 1, 0, true, 'C', true);
$pdf->SetFont('DejaVuSans', '', 12, '', true);
$pdf->Cell(440, 0, '../../....', 0, 1, 'C', 0, '', 0, false);
$pdf->SetTextColor(192, 192, 192);
$pdf->Cell(440, 0, 'İmza', 0, 1, 'C', 0, '', 0, false);
$pdf->SetTextColor(0, 0, 0);
$pdf->Cell(440, 0, $this->tesvik['IMZA_UNVAN'], 0, 1, 'C', 0, '', 0, false);
$pdf->Cell(440, 0, $this->tesvik['IMZA_ISIM'], 0, 1, 'C', 0, '', 0, false);
// Close and output PDF document
// This method has several options, check the source code documentation for more information.
$pdf->Output($this->IstekId . '#Ücret İadesi Talebi.pdf');
exit;
示例#6
0
    public function actionCetaklaporan($nopol, $tgl_awal, $tgl_akhir, $jenis)
    {
        $criteria = new CDbCriteria();
        if (!empty($tgl_awal) && empty($tgl_akhir)) {
            $criteria->condition = "TGL_PERBAIKAN>='{$tgl_awal}'";
        } else {
            if (empty($tgl_awal) && !empty($tgl_akhir)) {
                $criteria->condition = "TGL_PERBAIKAN<='{$tgl_akhir}'";
            } else {
                if (!empty($tgl_awal) && !empty($tgl_akhir)) {
                    $criteria->condition = "TGL_PERBAIKAN>='{$tgl_awal}' and TGL_PERBAIKAN<='{$tgl_akhir}'";
                }
            }
        }
        $criteria->with = array('iDKENDARAAN');
        $criteria->compare('iDKENDARAAN.NOPOL', $nopol, true);
        $criteria->compare('JENIS_PERBAIKAN', $jenis);
        $model = Perbaikan::model()->findAll($criteria);
        $pdf = new MYPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
        spl_autoload_register(array('YiiBase', 'autoload'));
        $pdf->SetCreator(PDF_CREATOR);
        $pdf->SetTitle("Laporan Rekap Perbaikan");
        $pdf->setHeaderFont(array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
        $pdf->setFooterFont(array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
        $pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
        $pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
        $pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
        $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
        $pdf->SetFont('helvetica', '', 8);
        $pdf->SetTextColor(80, 80, 80);
        $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
        $pdf->AddPage();
        $pdf->setJPEGQuality(75);
        $html = <<<EOD
\t\t<h1 align="center">LAPORAN PERBAIKAN</h1>
\t\t<table align="left" border="1" cellpadding="2" cellspacing="0">
\t\t\t<tbody>
\t\t\t\t<tr>
\t\t\t\t\t<td width="40" align="center">NO</td>
\t\t\t\t\t<td width="75" align="center">Nopol Kendaraan</td>
\t\t\t\t\t<td width="65" align="center">Tanggal Perbaikan</td>
\t\t\t\t\t<td width="150" align="center">Kerusakan</td>
\t\t\t\t\t<td width="75" align="center">Estimasi Waktu Perbaikan (hari)</td>
\t\t\t\t\t<td width="75" align="center">Jenis Perbaikan</td>
\t\t\t\t\t<td width="75" align="center">Status</td>
\t\t\t\t\t<td width="75" align="center">PJ Mekanik</td>
\t\t\t\t</tr>
EOD;
        $no_urut = 0;
        foreach ($model as $mod) {
            $no_urut++;
            $nopol = $mod->iDKENDARAAN->NOPOL;
            $jenis_perbaikan = "";
            if ($mod->JENIS_PERBAIKAN == 0) {
                $jenis_perbaikan = "Perbaikan";
            } else {
                if ($mod->JENIS_PERBAIKAN == 1) {
                    $jenis_perbaikan = "Penggantian";
                } else {
                    if ($mod->JENIS_PERBAIKAN == 2) {
                        $jenis_perbaikan = "Perbaikan dan Penggantian";
                    }
                }
            }
            $tgl_perb = "";
            if ($mod->TGL_PERBAIKAN != "0000-00-00") {
                $tgl_perb = date("d-M-y", strtotime($mod->TGL_PERBAIKAN));
            } else {
                $tgl_perb = '-';
            }
            $html .= <<<EOD
\t\t\t\t<tr>
\t\t\t\t\t<td width="40" align="center">{$no_urut}</td>
\t\t\t\t\t<td width="75" align="center">{$nopol}</td>
\t\t\t\t\t<td width="65" align="center">{$tgl_perb}</td>
\t\t\t\t\t<td width="150" align="center">{$mod->KERUSAKAN}</td>
\t\t\t\t\t<td width="75" align="center">{$mod->ESTIMASI_WAKTU_PERBAIKAN}</td>
\t\t\t\t\t<td width="75" align="center">{$jenis_perbaikan}</td>
\t\t\t\t\t<td width="75" align="center">{$mod->STATUS}</td>
\t\t\t\t\t<td width="75" align="center">{$mod->PJ_MEKANIK}</td>
\t\t\t\t</tr>
EOD;
        }
        $html .= <<<EOD
\t\t\t</tbody>
\t\t</table>
EOD;
        $pdf->writeHTMLCell(0, 0, '', '', $html, 0, 1, 0, true, '', true);
        $filename = Yii::getPathOfAlias('webroot') . '/laporan/perbaikan/rekap perbaikan tanggal ' . date('d-M-y') . '.pdf';
        $pdf->Output($filename, 'F');
        //Yii::app()->end();
        $this->redirect(Yii::app()->request->baseUrl . '/laporan/perbaikan/rekap perbaikan tanggal ' . date('d-M-y') . '.pdf');
    }
    //
    // Setup the PDF basics
    //
    $pdf->SetCreator('Ciniki');
    $pdf->SetAuthor($business_details['name']);
    $pdf->SetTitle($conference['name']);
    $pdf->SetSubject('');
    $pdf->SetKeywords('');
    // set margins
    $pdf->SetMargins($pdf->left_margin, $pdf->top_margin + $pdf->header_height, $pdf->right_margin);
    $pdf->SetHeaderMargin($pdf->top_margin);
    // set font
    $pdf->SetFont('times', 'BI', 10);
    $pdf->SetCellPadding(2);
    $pdf->SetFillColor(255);
    $pdf->SetTextColor(0);
    $pdf->SetDrawColor(51);
    $pdf->SetLineWidth(0.15);
    foreach ($presentations as $presentation) {
        // add a page
        $pdf->AddPage();
        $pdf->SetFont('', 'B', 12);
        $pdf->MultiCell(180, 1, $presentation['display_title'], 0, 'L');
        $pdf->SetFont('', '', 11);
        $pdf->MultiCell(180, 1, $presentation['field'], 0, 'L');
        $pdf->SetFont('', '', 10);
        $pdf->Ln();
        $pdf->MultiCell(180, 8, $presentation['description'], 0, 'L');
    }
    return array('stat' => 'ok', 'presentations' => $presentations, 'conference' => $conference, 'pdf' => $pdf);
}
示例#8
0
    public function actionCetaklaporan($penerbit, $nopol, $tgl_awal, $tgl_akhir)
    {
        $criteria = new CDbCriteria();
        if (!empty($tgl_awal) && empty($tgl_akhir)) {
            $criteria->condition = "TGL_PERJALANAN>='{$tgl_awal}'";
        } else {
            if (empty($tgl_awal) && !empty($tgl_akhir)) {
                $criteria->condition = "TGL_PERJALANAN<='{$tgl_akhir}'";
            } else {
                if (!empty($tgl_awal) && !empty($tgl_akhir)) {
                    $criteria->condition = "TGL_PERJALANAN>='{$tgl_awal}' and TGL_PERJALANAN<='{$tgl_akhir}'";
                }
            }
        }
        $criteria->compare('ID_PENERBIT', $penerbit, true);
        $criteria->compare('ID_KENDARAAN', $nopol);
        $model = Perjalanan::model()->findAll($criteria);
        $pdf = new MYPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
        spl_autoload_register(array('YiiBase', 'autoload'));
        $pdf->SetCreator(PDF_CREATOR);
        $pdf->SetTitle("Laporan Rekap Perjalanan");
        $pdf->setHeaderFont(array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
        $pdf->setFooterFont(array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
        $pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
        $pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
        $pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
        $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
        $pdf->SetFont('helvetica', '', 8);
        $pdf->SetTextColor(80, 80, 80);
        $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
        $pdf->AddPage();
        $pdf->setJPEGQuality(75);
        $html = <<<EOD
\t\t<h1 align="center">LAPORAN PERJALANAN</h1>
\t\t<table align="left" border="1" cellpadding="2" cellspacing="0">
\t\t\t<tbody>
\t\t\t\t<tr>
\t\t\t\t\t<td width="25" align="center">NO</td>
\t\t\t\t\t<td width="75" align="center">Nama Penerbit</td>
\t\t\t\t\t<td width="65" align="center">Nopol Kendaraan</td>
\t\t\t\t\t<td width="55" align="center">Tanggal Perjalanan</td>
\t\t\t\t\t<td width="60" align="center">Nomor Surat PO</td>
\t\t\t\t\t<td width="75" align="center">Jenis Perintah</td>
\t\t\t\t\t<td width="40" align="center">Ritase</td>
\t\t\t\t\t<td width="40" align="center">Titipan Awal</td>
\t\t\t\t\t<td width="40" align="center">Lebih</td>
\t\t\t\t\t<td width="40" align="center">Kurang</td>
\t\t\t\t\t<td width="40" align="center">Akhir</td>
\t\t\t\t\t<td width="65" align="center">Status</td>
\t\t\t\t</tr>
EOD;
        $no_urut = 0;
        foreach ($model as $mod) {
            $no_urut++;
            $penerbit = $mod->iDPENERBIT->NAMA_PENERBIT;
            $nopol = $mod->iDKENDARAAN->NOPOL;
            $tgl_perj = "";
            if ($mod->TGL_PERJALANAN != "0000-00-00") {
                $tgl_perj = date("d-M-y", strtotime($mod->TGL_PERJALANAN));
            } else {
                $tgl_perj = '-';
            }
            $html .= <<<EOD
\t\t\t\t<tr>
\t\t\t\t\t<td width="25" align="center">{$no_urut}</td>
\t\t\t\t\t<td width="75" align="center">{$penerbit}</td>
\t\t\t\t\t<td width="65" align="center">{$nopol}</td>
\t\t\t\t\t<td width="55" align="center">{$tgl_perj}</td>
\t\t\t\t\t<td width="60" align="center">{$mod->NO_SURAT_PO}</td>
\t\t\t\t\t<td width="75" align="center">{$mod->JENIS_PERINTAH}</td>
\t\t\t\t\t<td width="40" align="center">{$mod->RITASE}</td>
\t\t\t\t\t<td width="40" align="center">{$mod->TITIPAN_AWAL}</td>
\t\t\t\t\t<td width="40" align="center">{$mod->LEBIH}</td>
\t\t\t\t\t<td width="40" align="center">{$mod->KURANG}</td>
\t\t\t\t\t<td width="40" align="center">{$mod->AKHIR}</td>
\t\t\t\t\t<td width="65" align="center">{$mod->STATUS}</td>
\t\t\t\t</tr>
EOD;
        }
        $html .= <<<EOD
\t\t\t</tbody>
\t\t</table>
EOD;
        $pdf->writeHTMLCell(0, 0, '', '', $html, 0, 1, 0, true, '', true);
        $filename = Yii::getPathOfAlias('webroot') . '/laporan/PO/rekap perjalanan tanggal ' . date('d-M-y') . '.pdf';
        $pdf->Output($filename, 'F');
        //Yii::app()->end();
        $this->redirect(Yii::app()->request->baseUrl . '/laporan/PO/rekap perjalanan tanggal ' . date('d-M-y') . '.pdf');
    }