当前位置: 首页>>代码示例>>PHP>>正文


PHP PDF::SetTextColor方法代码示例

本文整理汇总了PHP中PDF::SetTextColor方法的典型用法代码示例。如果您正苦于以下问题:PHP PDF::SetTextColor方法的具体用法?PHP PDF::SetTextColor怎么用?PHP PDF::SetTextColor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PDF的用法示例。


在下文中一共展示了PDF::SetTextColor方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: render

 /**
  * PDF Text renderer
  *
  * @param PDF $pdf
  *
  * @return void
  */
 function render($pdf)
 {
     // Set up the style
     if ($pdf->getCurrentStyle() != $this->styleName) {
         $pdf->setCurrentStyle($this->styleName);
     }
     $temptext = str_replace("#PAGENUM#", $pdf->PageNo(), $this->text);
     // underline «title» part of Source item
     $temptext = str_replace(array('«', '»'), array('<u>', '</u>'), $temptext);
     // Paint the text color or they might use inherited colors by the previous function
     $match = array();
     if (preg_match("/#?(..)(..)(..)/", $this->color, $match)) {
         $r = hexdec($match[1]);
         $g = hexdec($match[2]);
         $b = hexdec($match[3]);
         $pdf->SetTextColor($r, $g, $b);
     } else {
         $pdf->SetTextColor(0, 0, 0);
     }
     $temptext = spanLTRRTL($temptext, "BOTH");
     $temptext = str_replace(array('<br><span dir="rtl" >', '<br><span dir="ltr" >', '> ', ' <'), array('<span dir="rtl" ><br>', '<span dir="ltr" ><br>', '>&nbsp;', '&nbsp;<'), $temptext);
     $pdf->writeHTML($temptext, false, false, true, false, "");
     //change height - line break etc. - the form is mirror on rtl pages
     // Reset the text color to black or it will be inherited
     $pdf->SetTextColor(0, 0, 0);
 }
开发者ID:jacoline,项目名称:webtrees,代码行数:33,代码来源:PDF_Text.php

示例2: PDF

 function __construct($datos)
 {
     $pdf = new PDF();
     // [ Establesco Todos los datos que conendra la Factura ]
     $pdf->set_data($datos);
     $pdf->FPDF('P', 'mm', 'Letter');
     // Esta funcion la uso cuando voy a imprimir  al final el numero de la paguina $pdf->AliasNbPages();
     $pdf->AddPage();
     $pdf->SetFont('Arial', '', 12);
     //$pdf->SetTextColor(20,20,250); COLOR AZUL
     $pdf->SetTextColor(0, 0, 0);
     $pdf->menbrete();
     $pdf->detalle($datos['productos']);
     $pdf->Output();
 }
开发者ID:julio899,项目名称:factura_ktux,代码行数:15,代码来源:class_factura.php

示例3: Header

//while
class PDF extends PDF_MySQL_Table
{
    function Header()
    {
        //Title
        //Ensure table header is output
        parent::Header();
    }
}
//Connect to database
mysql_connect("{$db_hostname}", "{$db_username}", "{$db_password}");
mysql_select_db('remsdb');
$pdf = new PDF("L", "mm", array(400, 200));
$pdf->AddPage();
$pdf->SetTextColor(0, 0, 0);
$pdf->SetFont('Times', 'B', 16);
$pdf->SetTextColor(0, 0, 0);
$pdf->SetFont('Times', 'B', 14);
$pdf->SetY(8);
$pdf->SetX(10);
$pdf->Cell(0, 3, $pdfAgencyName, 0, 1, 'L');
$pdf->Ln(5);
$pdf->SetFont('Times', 'B', 12);
$pdf->SetTextColor(131, 130, 139);
$pdf->Cell(0, 3, "Powered by Getchs;", 0, 1, 'L');
$pdf->tdheight = 5;
$pdf->Ln(30);
$pdf->SetFont('Times', 'B', 24);
$pdf->SetTextColor(64, 64, 64);
$pdf->Cell(0, 3, "LIST OF ALL ENDORSED APPLICANT", 0, 1, 'C');
开发者ID:gencalda,项目名称:Recruitment-Employee-Performance-Monitoring-System,代码行数:31,代码来源:pdfEndorsementSummary.php

示例4: PDF

        }
        return $json[$themeasure]["style"]["prefix"] . $data . $json[$themeasure]["style"]["units"];
    }
}
// Create PDF
$pdf = new PDF('P', 'in', 'Letter');
/************************************************************
Cover Page
************************************************************/
$pdf->AddPage();
// title page image background
$pdf->Image('reportCoverPageCompass.png', 0, 0, 8.5);
// White text on top of title page
// $pdf->SetTextColor(255,255,255);
// Title page header
$pdf->SetTextColor(0, 0, 45);
$pdf->SetFont('Arial', 'B', 50);
$pdf->Ln(5.35);
$pdf->Cell(0.3);
$pdf->Cell(0, 0, "Compass Profile Area");
if ($reportRadioValue == 'census') {
    $pdf->SetTextColor(0, 0, 45);
    $pdf->SetFont('Arial', 'B', 40);
    $pdf->Ln(1);
    // $aryPrettyBlock = explode(" - ", $censusBlock);
    // $prettyBlock = $aryPrettyBlock[1];
    $pdf->Cell(0.3);
    $pdf->Cell(0, 0, $censusBlock);
} elseif ($reportRadioValue == 'neighborhood') {
    $pdf->SetTextColor(0, 0, 45);
    $pdf->SetFont('Arial', 'B', 40);
开发者ID:NeighborhoodCompass,项目名称:Compass1.0,代码行数:31,代码来源:report+-+Copy.php

示例5: round

        $prefix = $json[$themeasure]['style']['prefix'];
    }
    $average = round($measureSum / $count, 0, PHP_ROUND_HALF_UP);
    // return $average;
    return $prefix . $average . $suffix;
}
// Create PDF
$pdf = new PDF('P', 'in', 'Letter');
/************************************************************
Cover Page
************************************************************/
$pdf->AddPage();
// title page image background
$pdf->Image('reportCoverPageCompass.png', 0, 0, 8.5);
// White text on top of title page
$pdf->SetTextColor(255, 255, 255);
if ($reportRadioValue == 'census') {
    $features = $censusBlocks;
} elseif ($reportRadioValue == 'neighborhood') {
    $features = $neighborhoods;
}
foreach ($features as $key => $feature) {
    // $key = array_search('green', $array);
    $theOID = $OIDs[$key];
    $theName = $Names[$key];
    $theNPAData = $npadataset[$key];
    if ($key == 0) {
        // Title page header
        $pdf->SetTextColor(0, 0, 45);
        $pdf->SetFont('Arial', 'B', 40);
        $pdf->Ln(5.35);
开发者ID:NeighborhoodCompass,项目名称:Compass1.0,代码行数:31,代码来源:reportNew.php

示例6: PDF

// Add pdf page
$orientation = "L";
$pdf = new PDF($orientation, 'pt', 'Letter');
$pdf->SetProtection(array('print'));
$pdf->AddPage();
if (ini_get('magic_quotes_gpc') == '1') {
    $customtext = stripslashes($customtext);
}
// Add images and lines
print_border_letter($certificate->borderstyle, $orientation);
draw_frame_letter($certificate->bordercolor, $orientation);
print_watermark_letter($certificate->printwmark, $orientation);
print_seal($certificate->printseal, $orientation, 590, 425, '', '');
print_signature($certificate->printsignature, $orientation, 110, 450, '', '');
// Add text
$pdf->SetTextColor(0, 0, 120);
cert_printtext(150, 125, 'C', 'Helvetica', 'B', 30, utf8_decode(get_string("titleletterlandscape", "certificate")));
$pdf->SetTextColor(0, 0, 0);
cert_printtext(150, 180, 'C', 'Times', 'B', 20, utf8_decode(get_string("introletterlandscape", "certificate")));
cert_printtext(150, 230, 'C', 'Helvetica', '', 30, utf8_decode($studentname));
cert_printtext(150, 280, 'C', 'Helvetica', '', 20, utf8_decode(get_string("statementletterlandscape", "certificate")));
cert_printtext(150, 330, 'C', 'Helvetica', '', 20, utf8_decode($course->fullname));
cert_printtext(150, 380, 'C', 'Helvetica', '', 14, utf8_decode($certificatedate));
cert_printtext(150, 420, 'C', 'Times', '', 10, utf8_decode($grade));
cert_printtext(150, 431, 'C', 'Times', '', 10, utf8_decode($outcome));
cert_printtext(150, 442, 'C', 'Times', '', 10, utf8_decode($credithours));
cert_printtext(150, 500, 'C', 'Times', '', 10, utf8_decode($code));
$i = 0;
if ($certificate->printteacher) {
    $context = get_context_instance(CONTEXT_MODULE, $cm->id);
    if ($teachers = get_users_by_capability($context, 'mod/certificate:printteacher')) {
开发者ID:nadavkav,项目名称:MoodleTAO,代码行数:31,代码来源:certificate.php

示例7: maxCaracter

/////////header
$pdf->SetFont('Arial', 'B', 10);
/////////medio
$pdf->SetFont('Amble-Regular', '', 10);
$pdf->Text(30, 42, maxCaracter(utf8_decode($cliente), 80), 1, 0, 'L', 0);
/////cliente
$pdf->Text(30, 48, maxCaracter(utf8_decode($fecha), 20), 1, 0, 'L', 0);
/////fecha
$pdf->Text(30, 53, maxCaracter(utf8_decode($direccion), 35), 1, 0, 'L', 0);
////direccion
$pdf->Text(155, 42, maxCaracter(utf8_decode($ci_ruc), 20), 1, 0, 'L', 0);
////ruc ci
$pdf->Text(155, 48, maxCaracter(utf8_decode($telefono), 20), 1, 0, 'L', 0);
////telefono
if ($estado == 'Pasivo') {
    $pdf->SetTextColor(249, 33, 33);
    $pdf->RotatedImage('../images/circle.png', 110, 42, 30, 10, 45);
    $pdf->RotatedText(120, 41, 'ANULADO!', 45);
    $pdf->RotatedImage('../images/circle.png', 260, 42, 30, 10, 45);
    $pdf->RotatedText(269, 41, 'ANULADO!', 45);
}
////////detalles
$sql = pg_query("select cantidad,articulo,precio_venta,total_venta from  detalle_factura_venta,productos where id_factura_venta = '" . $_GET['id'] . "' and detalle_factura_venta.cod_productos = productos.cod_productos and productos.incluye_iva= 'Si'");
$yy = 66;
$iva_base = 1.12;
$pdf->SetTextColor(0, 0, 0);
while ($row = pg_fetch_row($sql)) {
    $total_si = 0;
    $total_sit = 0;
    $total_si = $row[3] / $iva_base;
    $total_sit = $total_si / $row[0];
开发者ID:Oskrin,项目名称:comisariato,代码行数:31,代码来源:factura_venta_trabajo.php

示例8:

     $pdf->SetX(1);
     // $pdf->Cell(22, 6, utf8_decode('Comprobante'),1,0, 'C',0);
     $pdf->Cell(20, 6, utf8_decode('Fecha'), 1, 0, 'C', 0);
     $pdf->Cell(50, 6, utf8_decode('Nro Factura'), 1, 0, 'C', 0);
     $pdf->Cell(15, 6, utf8_decode('Subtotal'), 1, 0, 'C', 0);
     $pdf->Cell(17, 6, utf8_decode('Descuento'), 1, 0, 'C', 0);
     $pdf->Cell(16, 6, utf8_decode('Tarifa 0%'), 1, 0, 'C', 0);
     $pdf->Cell(17, 6, utf8_decode('Tarifa 12%'), 1, 0, 'C', 0);
     $pdf->Cell(15, 6, utf8_decode('Iva 12%'), 1, 0, 'C', 0);
     $pdf->Cell(15, 6, utf8_decode('Total'), 1, 0, 'C', 0);
     $pdf->Cell(20, 6, utf8_decode('Fecha Pago'), 1, 0, 'C', 0);
     $pdf->Cell(20, 6, utf8_decode('Tipo Pago'), 1, 1, 'C', 0);
     $repetido = 1;
 }
 if ($row1[14] == "Activo") {
     $pdf->SetTextColor(0, 0, 0);
     $pdf->SetX(1);
     // $pdf->Cell(22, 6, utf8_decode($row1[13]),0,0, 'C',0);
     $pdf->Cell(20, 6, utf8_decode($row1[1]), 0, 0, 'C', 0);
     $pdf->Cell(50, 6, utf8_decode(substr($row1[0], 8)), 0, 0, 'C', 0);
     $sub = $sub + ($row1[10] - $row1[8] - $row1[9]);
     $pdf->Cell(15, 6, $row1[10] - $row1[8] - $row1[9], 0, 0, 'C', 0);
     $desc = $desc + $row1[9];
     $pdf->Cell(17, 6, $row1[9], 0, 0, 'C', 0);
     $pdf->Cell(16, 6, $row1[6], 0, 0, 'C', 0);
     $pdf->Cell(17, 6, $row1[7], 0, 0, 'C', 0);
     $ivaT = $ivaT + $row1[8];
     $pdf->Cell(15, 6, $row1[8], 0, 0, 'C', 0);
     $total = $total + $row1[10];
     $t0 = $row1[6];
     $pdf->Cell(15, 6, $row1[10], 0, 0, 'C', 0);
开发者ID:Oskrin,项目名称:neltex_formulario,代码行数:31,代码来源:resumenFacturasVentas.php

示例9: iconv

/*
$pdf->setXY($abs_x , $y_absolute +  ($r*33)  );
$pdf->SetFont('angsana','I',15);
$pdf->MultiCell( 0  , 0 , iconv( 'UTF-8','cp874' ,'                       '.'Center of Cleft Lip - Cleft Palate and Craniofacial Deformities ,Khon Kaen University '  ));
$pdf->setXY($abs_x , $y_absolute +  ($r*34)  );
$pdf->SetFont('angsana','I',15);
$pdf->MultiCell( 0  , 0 , iconv( 'UTF-8','cp874' ,'                                     '.'in Association with "Tawanchai Project" (Tawanchai Cleft Center) '  ));
$pdf->setXY($abs_x , $y_absolute +  ($r*35)  );
$pdf->SetFont('angsana','I',15);
$pdf->MultiCell( 0  , 0 , iconv( 'UTF-8','cp874' ,'                                                             '.'http://www.tawanchai-foundation.org/'  ));
$pdf->setXY($abs_x , $y_absolute +  ($r*36)  );
$pdf->SetFont('angsana','I',15);
$pdf->MultiCell( 0  , 0 , iconv( 'UTF-8','cp874' , '                                                        '.'Registration date : '.$today  ));
*/
$pdf->setXY($abs_x, $y_absolute + $r * 33);
$pdf->SetTextColor(0, 0, 255);
#blue color
$pdf->SetFont('angsana', '', 14);
$pdf->MultiCell(0, 0, iconv('UTF-8', 'cp874', '                      ' . 'ใบเสร็จอิเล็กทรอนิกส์ฉบับนี้สามารถนำไปเบิกจ่ายค่าลงทะเบียนจากต้นสังกัดคืนได้'));
$pdf->SetTextColor(0);
$pdf->setXY($abs_x, $y_absolute + $r * 34);
$pdf->SetFont('angsana', '', 13);
$pdf->MultiCell(0, 0, iconv('UTF-8', 'cp874', '              ' . ' 8th Annual Meeting of the Thai Cleft Lip-Palate and Craniofacial Association: Internation Congress '));
$pdf->setXY($abs_x, $y_absolute + $r * 35);
$pdf->SetFont('angsana', '', 13);
$pdf->MultiCell(0, 0, iconv('UTF-8', 'cp874', '                                                              ' . 'http://www.thaicleft2015.org'));
////Put watermark
$pdf->SetFont('angsana', 'B', 60);
$pdf->SetTextColor(211, 211, 211);
//red,green,blue   211,211,211  gray color
$pdf->Rotate(30, 150, 150);
开发者ID:jutturong,项目名称:report_thaicleft,代码行数:31,代码来源:report_cleft_update.php

示例10: Footer

    {
    }
    function Footer()
    {
        //Position at 1.5 cm from bottom
        $this->SetXY(90, -15);
        //Arial italic 8
        $this->SetFont('Arial', 'I', 10);
        //Page number
        $this->Cell(0, 5, 'Powered by ', 0, 0, 'C');
        $this->Image('images/xlogo10.jpg', 160, 280, 22);
    }
}
$mypdf = new PDF();
$mypdf->AddPage();
$mypdf->SetTextColor(51, 51, 51);
$mypdf->SetFont('Arial', 'I', 10);
try {
    include 'dbcon.php';
    $sql1 = "SELECT * from tbluserdetails Where `UserName`= '{$User}'";
    $result = $dbh->prepare($sql1);
    $result->execute();
    $row1 = $result->fetch();
    $sql = "SELECT * from tbluserexpenses Where `UserName`= '{$User}'";
    $result = $dbh->prepare($sql);
    $result->execute();
    $row = $result->fetch();
    $sql2 = "SELECT * from tblreportstore Where `UserID`= '{$UserID}'";
    $result1 = $dbh->prepare($sql2);
    $result1->execute();
    $row3 = $result1->fetch();
开发者ID:VulcanInfotech,项目名称:Xpensy,代码行数:31,代码来源:Get+PDF+Download.php

示例11: PDF

        $this->Cell(0, 6, "{$num} {$label}", 0, 1, 'L', true);
        $this->Ln(0);
    }
    function ChapterTitle2($num, $label)
    {
        $this->SetFont('Arial', '', 12);
        $this->SetFillColor(249, 249, 249);
        $this->Cell(0, 6, "{$num} {$label}", 0, 1, 'L', true);
        $this->Ln(0);
    }
}
$pdf = new PDF();
$pdf->AliasNbPages();
$pdf->AddPage();
$pdf->SetFont('Times', '', 12);
$pdf->SetTextColor(32);
$pdf->Cell(0, 5, $company, 0, 1, 'R');
$pdf->Cell(0, 5, $address, 0, 1, 'R');
$pdf->Cell(0, 5, $email, 0, 1, 'R');
$pdf->Cell(0, 5, 'Tel: ' . $telephone, 0, 1, 'R');
$pdf->Cell(0, 30, '', 0, 1, 'R');
$pdf->SetFillColor(200, 220, 255);
//$pdf->ChapterTitle('Invoice Number ',$number);
$pdf->ChapterTitle('Invoice Date ', date('d-m-Y'));
$pdf->Cell(0, 20, '', 0, 1, 'R');
$pdf->SetFillColor(224, 235, 255);
$pdf->SetDrawColor(192, 192, 192);
$pdf->Cell(170, 7, 'Item', 1, 0, 'L');
$pdf->Cell(20, 7, 'Price', 1, 1, 'C');
while ($row = $result->fetch_array()) {
    $pdf->Cell(20, 7, $row[0], 1, 0, 'L', 0);
开发者ID:nmngarg174,项目名称:tuckShop,代码行数:31,代码来源:sprint.php

示例12: Footer

         $this->Cell(2.7 / 100 * $width, $height, '', 'BRL', 0, 'C', 1);
         $this->Ln();
     }
     function Footer()
     {
         $this->SetY(-15);
         $this->SetFont('Arial', 'I', 8);
         $this->Cell(10, 10, 'Page ' . $this->PageNo() . " Print Time:" . date('Y-m-d H:i:s') . " By:" . $_SESSION['empl']['name'], 0, 0, 'L');
     }
 }
 $pdf = new PDF('L', 'pt', 'Legal');
 $width = $pdf->w - $pdf->lMargin - $pdf->rMargin;
 $height = 12;
 $pdf->AddPage();
 $pdf->SetFillColor(255, 255, 255);
 $pdf->SetTextColor(0, 0, 0);
 $pdf->SetFont('Arial', '', 7);
 $no = 0;
 if (!empty($karyawan)) {
     foreach ($karyawan as $kar) {
         $hadir = 0;
         $telat = 0;
         $cuti = 0;
         $dinas = 0;
         $mangkir = 0;
         $no += 1;
         // LINE PERTAMA
         $pdf->Cell(2 / 100 * $width, $height, $no, 'TRL', 0, 'R', 1);
         $pdf->Cell(9.5 / 100 * $width, $height, $kar['nama'], 'TRL', 0, 'L', 1);
         if (!empty($tanggaltanggal)) {
             foreach ($tanggaltanggal as $tang) {
开发者ID:halimc17,项目名称:magsys,代码行数:31,代码来源:sdm_slave_2rekapabsenho1.php

示例13: invoice

 /**
  * Main
  *
  * @param object $order Order
  * @param string $mode Download or display (optional)
  */
 public static function invoice($order, $mode = 'D', $multiple = false, &$pdf = NULL, $slip = false, $delivery = false)
 {
     global $cookie, $ecotax;
     if (!Validate::isLoadedObject($order) or !$cookie->id_employee and (!OrderState::invoiceAvailable($order->getCurrentState()) and !$order->invoice_number)) {
         die('Invalid order or invalid order state');
     }
     self::$order = $order;
     self::$orderSlip = $slip;
     self::$delivery = $delivery;
     self::$_iso = strtoupper(Language::getIsoById(intval(self::$order->id_lang)));
     if ((self::$_priceDisplayMethod = $order->getTaxCalculationMethod()) === false) {
         die(self::l('No price display method defined for the customer group'));
     }
     if (!$multiple) {
         $pdf = new PDF('P', 'mm', 'A4');
     }
     $pdf->SetAutoPageBreak(true, 35);
     $pdf->StartPageGroup();
     self::$currency = Currency::getCurrencyInstance(intval(self::$order->id_currency));
     $pdf->AliasNbPages();
     $pdf->AddPage();
     /* Display address information */
     $invoice_address = new Address(intval($order->id_address_invoice));
     $invoiceState = $invoice_address->id_state ? new State($invoice_address->id_state) : false;
     $delivery_address = new Address(intval($order->id_address_delivery));
     $deliveryState = $delivery_address->id_state ? new State($delivery_address->id_state) : false;
     $shop_country = Configuration::get('PS_SHOP_COUNTRY');
     $invoice_customer = new Customer(intval($invoice_address->id_customer));
     $width = 100;
     $pdf->SetX(10);
     $pdf->SetY(25);
     $pdf->SetFont(self::fontname(), '', 12);
     $pdf->Cell($width, 10, self::l('Delivery'), 0, 'L');
     $pdf->Cell($width, 10, self::l('Invoicing'), 0, 'L');
     $pdf->Ln(5);
     $pdf->SetFont(self::fontname(), '', 9);
     if (!empty($delivery_address->company) or !empty($invoice_address->company)) {
         $pdf->Cell($width, 10, Tools::iconv('utf-8', self::encoding(), $delivery_address->company), 0, 'L');
         $pdf->Cell($width, 10, Tools::iconv('utf-8', self::encoding(), $invoice_address->company), 0, 'L');
         $pdf->Ln(5);
     }
     $pdf->Cell($width, 10, Tools::iconv('utf-8', self::encoding(), $delivery_address->firstname) . ' ' . Tools::iconv('utf-8', self::encoding(), $delivery_address->lastname), 0, 'L');
     $pdf->Cell($width, 10, Tools::iconv('utf-8', self::encoding(), $invoice_address->firstname) . ' ' . Tools::iconv('utf-8', self::encoding(), $invoice_address->lastname), 0, 'L');
     $pdf->Ln(5);
     $pdf->Cell($width, 10, Tools::iconv('utf-8', self::encoding(), $delivery_address->address1), 0, 'L');
     $pdf->Cell($width, 10, Tools::iconv('utf-8', self::encoding(), $invoice_address->address1), 0, 'L');
     $pdf->Ln(5);
     if (!empty($invoice_address->address2) or !empty($delivery_address->address2)) {
         $pdf->Cell($width, 10, Tools::iconv('utf-8', self::encoding(), $delivery_address->address2), 0, 'L');
         $pdf->Cell($width, 10, Tools::iconv('utf-8', self::encoding(), $invoice_address->address2), 0, 'L');
         $pdf->Ln(5);
     }
     $pdf->Cell($width, 10, $delivery_address->postcode . ' ' . Tools::iconv('utf-8', self::encoding(), $delivery_address->city), 0, 'L');
     $pdf->Cell($width, 10, $invoice_address->postcode . ' ' . Tools::iconv('utf-8', self::encoding(), $invoice_address->city), 0, 'L');
     $pdf->Ln(5);
     $pdf->Cell($width, 10, Tools::iconv('utf-8', self::encoding(), $delivery_address->country . ($deliveryState ? ' - ' . $deliveryState->name : '')), 0, 'L');
     $pdf->Cell($width, 10, Tools::iconv('utf-8', self::encoding(), $invoice_address->country . ($invoiceState ? ' - ' . $invoiceState->name : '')), 0, 'L');
     $pdf->Ln(5);
     $pdf->Cell($width, 10, $delivery_address->phone, 0, 'L');
     if ($invoice_customer->dni != NULL) {
         $pdf->Cell($width, 10, self::l('Tax ID number:') . ' ' . Tools::iconv('utf-8', self::encoding(), $invoice_customer->dni), 0, 'L');
     }
     if (!empty($delivery_address->phone_mobile)) {
         $pdf->Ln(5);
         $pdf->Cell($width, 10, $delivery_address->phone_mobile, 0, 'L');
     }
     /*
      * display order information
      */
     $carrier = new Carrier(self::$order->id_carrier);
     if ($carrier->name == '0') {
         $carrier->name = Configuration::get('PS_SHOP_NAME');
     }
     $history = self::$order->getHistory(self::$order->id_lang);
     foreach ($history as $h) {
         if ($h['id_order_state'] == _PS_OS_SHIPPING_) {
             $shipping_date = $h['date_add'];
         }
     }
     $pdf->Ln(12);
     $pdf->SetFillColor(240, 240, 240);
     $pdf->SetTextColor(0, 0, 0);
     $pdf->SetFont(self::fontname(), '', 9);
     if (self::$orderSlip) {
         $pdf->Cell(0, 6, self::l('SLIP #') . sprintf('%06d', self::$orderSlip->id) . ' ' . self::l('from') . ' ' . Tools::displayDate(self::$orderSlip->date_upd, self::$order->id_lang), 1, 2, 'L', 1);
     } elseif (self::$delivery) {
         $pdf->Cell(0, 6, self::l('DELIVERY SLIP #') . Configuration::get('PS_DELIVERY_PREFIX', intval($cookie->id_lang)) . sprintf('%06d', self::$delivery) . ' ' . self::l('from') . ' ' . Tools::displayDate(self::$order->delivery_date, self::$order->id_lang), 1, 2, 'L', 1);
     } else {
         $pdf->Cell(0, 6, self::l('INVOICE #') . Configuration::get('PS_INVOICE_PREFIX', intval($cookie->id_lang)) . sprintf('%06d', self::$order->invoice_number) . ' ' . self::l('from') . ' ' . Tools::displayDate(self::$order->invoice_date, self::$order->id_lang), 1, 2, 'L', 1);
     }
     $pdf->Cell(55, 6, self::l('Order #') . sprintf('%06d', self::$order->id), 'L', 0);
     $pdf->Cell(70, 6, self::l('Carrier:') . ($order->gift ? ' ' . Tools::iconv('utf-8', self::encoding(), $carrier->name) : ''), 'L');
     $pdf->Cell(0, 6, self::l('Payment method:'), 'LR');
     $pdf->Ln(5);
//.........这里部分代码省略.........
开发者ID:vincent,项目名称:theinvertebrates,代码行数:101,代码来源:PDF.php

示例14:

 /**
  *   Show table for lines
  *
  *   @param		PDF			$pdf     		Object PDF
  *   @param		string		$tab_top		Top position of table
  *   @param		string		$tab_height		Height of table (rectangle)
  *   @param		int			$nexY			Y
  *   @param		Translate	$outputlangs	Langs object
  *   @param		int			$hidetop		Hide top bar of array
  *   @param		int			$hidebottom		Hide bottom bar of array
  *   @return	void
  */
 function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0)
 {
     global $conf, $mysoc;
     $default_font_size = pdf_getPDFFontSize($outputlangs);
     $pdf->SetDrawColor(128, 128, 128);
     // Rect prend une longueur en 3eme param
     $pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height);
     // line prend une position y en 3eme param
     $pdf->line($this->marge_gauche, $tab_top + 6, $this->page_largeur - $this->marge_droite, $tab_top + 6);
     $pdf->SetTextColor(0, 0, 0);
     $pdf->SetFont('', '', $default_font_size);
     $pdf->SetXY($this->posxref, $tab_top + 1);
     $pdf->MultiCell($this->posxlabel - $this->posxref, 3, $outputlangs->transnoentities("Tasks"), '', 'L');
     $pdf->SetXY($this->posxlabel, $tab_top + 1);
     $pdf->MultiCell($this->posxworkload - $this->posxlabel, 3, $outputlangs->transnoentities("Description"), 0, 'L');
     $pdf->SetXY($this->posxworkload, $tab_top + 1);
     $pdf->MultiCell($this->posxprogress - $this->posxworkload, 3, $outputlangs->transnoentities("PlannedWorkloadShort"), 0, 'R');
     $pdf->SetXY($this->posxprogress, $tab_top + 1);
     $pdf->MultiCell($this->posxdatestart - $this->posxprogress, 3, '%', 0, 'R');
     $pdf->SetXY($this->posxdatestart, $tab_top + 1);
     $pdf->MultiCell($this->posxdateend - $this->posxdatestart, 3, '', 0, 'C');
     $pdf->SetXY($this->posxdateend, $tab_top + 1);
     $pdf->MultiCell($this->page_largeur - $this->marge_droite - $this->posxdatestart, 3, '', 0, 'C');
 }
开发者ID:Albertopf,项目名称:prueba,代码行数:36,代码来源:pdf_baleine.modules.php

示例15: explode

 $descon = utf8_decode($row['descon']);
 $obscon = utf8_decode($row['obscon']);
 $fotos = explode(",", $row['fotos']);
 //Creación del objeto de la clase heredada
 //$pdf=new PDF();
 //$pdf->AliasNbPages();
 /*	if (!isset($pdf)) {
 			$pdf=new PDF();
 			$pdf->AliasNbPages();
 		}
 	*/
 $pdf->AddPage();
 $pdf->SetDisplayMode('fullpage');
 $pdf->SetMargins(20, 20, 20);
 $pdf->SetFont('Arial', 'BU', 14);
 $pdf->SetTextColor(70, 125, 25);
 $pdf->Cell(0, 10, 'FICHA DE CHECK DOMICILIARIO', 0, 1, 'C');
 $pdf->Ln(2);
 $pdf->SetTextColor(0, 0, 0);
 $pdf->SetFont('Arial', 'B', 12);
 $pdf->Cell(55, 7, 'NOMBRES Y APELLIDOS', 1, 0, 'L');
 $pdf->SetFont('Arial', '', 12);
 $pdf->Cell(0, 7, $nombre, 1, 1, 'C');
 $pdf->SetFont('Arial', 'B', 12);
 $pdf->Cell(55, 7, 'DIRECCION', 1, 0, 'L');
 $pdf->SetFont('Arial', '', 12);
 $pdf->MultiCell(0, 7, $domicilio, 1, 'C');
 //$pdf->Ln(2);
 //$pdf->Image('../files/images_dni/imagen1.png',40,null,0,130);
 $pdf->Ln(2);
 $pdf->SetFont('Arial', 'B', 12);
开发者ID:ehuertasf,项目名称:pro_new,代码行数:31,代码来源:rptCheckDomiciliario.php


注:本文中的PDF::SetTextColor方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。