當前位置: 首頁>>代碼示例>>PHP>>正文


PHP MYPDF::SetFillColor方法代碼示例

本文整理匯總了PHP中MYPDF::SetFillColor方法的典型用法代碼示例。如果您正苦於以下問題:PHP MYPDF::SetFillColor方法的具體用法?PHP MYPDF::SetFillColor怎麽用?PHP MYPDF::SetFillColor使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在MYPDF的用法示例。


在下文中一共展示了MYPDF::SetFillColor方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1:

// 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);
foreach ($trainings->results as $training) {
開發者ID:masKratter,項目名稱:module-diary,代碼行數:31,代碼來源:module-diary_export_list.php

示例2: dirname

if (@file_exists(dirname(__FILE__) . '/lang/eng.php')) {
    require_once dirname(__FILE__) . '/lang/eng.php';
    $pdf->setLanguageArray($l);
}
// ---------------------------------------------------------
// set font
$pdf->SetFont('helvetica', '', 20);
// add a page
$pdf->AddPage();
$pdf->Write(0, 'Example of text layout using Multicell()', '', 0, 'L', true, 0, false, false, 0);
$pdf->Ln(5);
$pdf->SetFont('times', '', 9);
//$pdf->SetCellPadding(0);
//$pdf->SetLineWidth(2);
// set color for background
$pdf->SetFillColor(255, 255, 200);
$text = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. In sed imperdiet lectus. Phasellus quis velit velit, non condimentum quam. Sed neque urna, ultrices ac volutpat vel, laoreet vitae augue. Sed vel velit erat. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Cras eget velit nulla, eu sagittis elit. Nunc ac arcu est, in lobortis tellus. Praesent condimentum rhoncus sodales. In hac habitasse platea dictumst. Proin porta eros pharetra enim tincidunt dignissim nec vel dolor. Cras sapien elit, ornare ac dignissim eu, ultricies ac eros. Maecenas augue magna, ultrices a congue in, mollis eu nulla. Nunc venenatis massa at est eleifend faucibus. Vivamus sed risus lectus, nec interdum nunc.

Fusce et felis vitae diam lobortis sollicitudin. Aenean tincidunt accumsan nisi, id vehicula quam laoreet elementum. Phasellus egestas interdum erat, et viverra ipsum ultricies ac. Praesent sagittis augue at augue volutpat eleifend. Cras nec orci neque. Mauris bibendum posuere blandit. Donec feugiat mollis dui sit amet pellentesque. Sed a enim justo. Donec tincidunt, nisl eget elementum aliquam, odio ipsum ultrices quam, eu porttitor ligula urna at lorem. Donec varius, eros et convallis laoreet, ligula tellus consequat felis, ut ornare metus tellus sodales velit. Duis sed diam ante. Ut rutrum malesuada massa, vitae consectetur ipsum rhoncus sed. Suspendisse potenti. Pellentesque a congue massa.';
// print some rows just as example
for ($i = 0; $i < 10; ++$i) {
    $pdf->MultiRow('Row ' . ($i + 1), $text . "\n");
}
// reset pointer to the last page
$pdf->lastPage();
// ---------------------------------------------------------
//Close and output PDF document
$pdf->Output('example_020.pdf', 'I');
//============================================================+
// END OF FILE
//============================================================+
開發者ID:tcsoftwareaustin,項目名稱:vint,代碼行數:31,代碼來源:example_020.php

示例3: array

$pdf->SetFont('helvetica', '', 8);
//---------------------------------
$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>
開發者ID:jkarlos1402,項目名稱:DGIMy,代碼行數:31,代碼來源:ejem_pdf.php

示例4: foreach

 $pdf->conference_name = $conference['name'];
 //
 // 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);
開發者ID:ciniki,項目名稱:conferences,代碼行數:31,代碼來源:reviewerPresentationsPDF.php

示例5: Footer

        //  $this->Cell(0, 15, 'Klassenliste der '.$_SESSION['myclass'], 0, 0, 'L', 0, '', 0, false, 'C', 'C');
        //  $this->Cell(0, 15, 'Datum: '.$_SESSION['datum'] , 0, 1, 'R', 0, '', 0, false, 'C', 'C');
    }
    // Page footer
    public function Footer()
    {
        // Position at 15 mm from bottom
        $this->SetY(-15);
        // Set font
        $this->SetFont('helvetica', 'I', 8);
        // Page number
        // $this->Cell(0, 10, 'Seite 1 von 2 ', 0, false, 'C', 0, '', 0, false, 'T', 'M');
    }
}
$pdf = new MYPDF('P', PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
$pdf->SetFillColor(150, 150, 150);
// set document information
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetAuthor('von-Buelow-Gymnasium');
$pdf->SetTitle('Notenliste');
$pdf->SetSubject('');
$pdf->SetKeywords('');
$pdf->AddPage('P', 'A4');
$lfdnr = 0;
$dist = 0;
$pdf->setY(30);
while ($meineSchueler = mysql_fetch_assoc($meineSchueler_tmp)) {
    $zeilenhoehe = $_GET['zeilenh'];
    $lfdnr++;
    $schueler_vorname = $meineSchueler['firstname'];
    $schueler_nachname = $meineSchueler['lastname'];
開發者ID:rft2014,項目名稱:buelow_web,代碼行數:31,代碼來源:makeNotenliste.php

示例6: Answer

$pdf->Write(0, $txt, '', 0, 'C', true, 0, false, false, 0);
// set font
$pdf->SetFont('freeserif', '', 16);
$txt = "\"" . $survey->getQuestion() . "\"";
$pdf->Write(0, $txt, '', 0, 'C', true, 0, false, false, 0);
$pdf->Ln(5);
// set cell padding
$pdf->setCellPaddings(1, 1, 1, 1);
// set cell margins
$pdf->setCellMargins(0, 0, 0, 0);
// set font
$pdf->SetFont('freeserif', 'B', 14);
$txt = 'Отговори';
$pdf->Write(0, $txt, '', 0, 'C', true, 0, false, false, 0);
// set color for background
$pdf->SetFillColor(225, 225, 225);
// set font
$pdf->SetFont('freeserif', '', 12);
// Multicell test
$txt = '№';
$pdf->MultiCell(10, '', $txt, 1, 'C', 1, 0, '', '', true);
$txt = 'Отговор';
$pdf->MultiCell(140, '', $txt, 1, 'C', 1, 0, '', '', true);
$txt = 'Тип';
$pdf->MultiCell(30, '', $txt, 1, 'C', 1, 1, '', '', true);
// set color for background
$pdf->SetFillColor(255, 255, 255);
$number_answer = 1;
foreach ($answers as $answer_id) {
    $answer = new Answer();
    $answer->get_from_db($answer_id);
開發者ID:tttodorov13,項目名稱:suSurvey,代碼行數:31,代碼來源:survey_print.php


注:本文中的MYPDF::SetFillColor方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。