本文整理汇总了PHP中FPDF::SetDrawColor方法的典型用法代码示例。如果您正苦于以下问题:PHP FPDF::SetDrawColor方法的具体用法?PHP FPDF::SetDrawColor怎么用?PHP FPDF::SetDrawColor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FPDF
的用法示例。
在下文中一共展示了FPDF::SetDrawColor方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: generate_attendees_PDF
public final function generate_attendees_PDF($tickets_list)
{
$this->load_pdf_libraries();
$pdf = new FPDF();
$ecp = TribeEvents::instance();
$pdf->AddFont('OpenSans', '', 'opensans.php');
$pdf->AddFont('SteelFish', '', 'steelfish.php');
$pdf->SetTitle('EventTicket');
$pdf->SetAuthor('The Events Calendar');
$pdf->SetCreator('The Events Calendar');
$defaults = array('event_id' => 0, 'ticket_name' => '', 'holder_name' => '', 'order_id' => '', 'ticket_id' => '', 'security_code' => '');
foreach ($tickets_list as $ticket) {
$ticket = wp_parse_args($ticket, $defaults);
$event = get_post($ticket['event_id']);
$venue_id = tribe_get_venue_id($event->ID);
$venue = !empty($venue_id) ? get_post($venue_id)->post_title : '';
$address = tribe_get_address($event->ID);
$zip = tribe_get_zip($event->ID);
$state = tribe_get_stateprovince($event->ID);
$city = tribe_get_city($event->ID);
$pdf->AddPage();
$pdf->SetDrawColor(28, 166, 205);
$pdf->SetFillColor(28, 166, 205);
$pdf->Rect(15, 10, 180, 34, 'F');
$pdf->SetTextColor(255);
$pdf->SetFont('OpenSans', '', 10);
$pdf->SetXY(30, 15);
$pdf->Write(5, __('EVENT NAME:', 'tribe-events-calendar'));
$pdf->SetXY(30, 28);
$pdf->SetFont('SteelFish', '', 53);
$title = strtoupper(utf8_decode($event->post_title));
$size = 53;
while ($pdf->GetStringWidth($title) > 151) {
$size--;
$pdf->SetFontSize($size);
}
$pdf->Write(5, $title);
$pdf->SetTextColor(41);
$pdf->SetFont('OpenSans', '', 10);
$pdf->SetXY(30, 50);
$pdf->Write(5, __('TICKET HOLDER:', 'tribe-events-calendar'));
$pdf->SetXY(104, 50);
$pdf->Write(5, __('LOCATION:', 'tribe-events-calendar'));
$pdf->SetFont('SteelFish', '', 30);
$pdf->SetXY(30, 59);
$holder = strtoupper(utf8_decode($ticket['holder_name']));
$size = 30;
while ($pdf->GetStringWidth($holder) > 70) {
$size--;
$pdf->SetFontSize($size);
}
$pdf->Write(5, $holder);
$pdf->SetXY(104, 59);
$venue = strtoupper(utf8_decode($venue));
$size = 30;
while ($pdf->GetStringWidth($venue) > 70) {
$size--;
$pdf->SetFontSize($size);
}
$pdf->Write(5, $venue);
$pdf->SetXY(104, 71);
$address = strtoupper(utf8_decode($address));
$size = 30;
while ($pdf->GetStringWidth($address) > 70) {
$size--;
$pdf->SetFontSize($size);
}
$pdf->Write(5, $address);
$pdf->SetXY(104, 83);
$address2 = array($city, $state, $zip);
$address2 = array_filter($address2);
$address2 = join(', ', $address2);
$address2 = strtoupper(utf8_decode($address2));
$size = 30;
while ($pdf->GetStringWidth($address2) > 70) {
$size--;
$pdf->SetFontSize($size);
}
$pdf->Write(5, $address2);
$pdf->Line(15, 97, 195, 97);
$pdf->SetFont('OpenSans', '', 10);
$pdf->SetXY(30, 105);
$pdf->Write(5, __('ORDER:', 'tribe-events-calendar'));
$pdf->SetXY(80, 105);
$pdf->Write(5, __('TICKET:', 'tribe-events-calendar'));
$pdf->SetXY(120, 105);
$pdf->Write(5, __('VERIFICATION:', 'tribe-events-calendar'));
$pdf->SetFont('SteelFish', '', 53);
$pdf->SetXY(30, 118);
$pdf->Write(5, $ticket['order_id']);
$pdf->SetXY(80, 118);
$pdf->Write(5, $ticket['ticket_id']);
$pdf->SetXY(120, 118);
$pdf->Write(5, $ticket['security_code']);
$pdf->Rect(15, 135, 180, 15, 'F');
$pdf->SetTextColor(255);
$pdf->SetFont('OpenSans', '', 10);
$pdf->SetXY(30, 140);
$pdf->Write(5, get_bloginfo('name'));
$pdf->SetXY(104, 140);
//.........这里部分代码省略.........
示例2: drawPDF
public function drawPDF()
{
$pdf = new \FPDF('P', 'mm', 'Letter');
$pdf->SetMargins(0, 3.175, 0);
$pdf->SetAutoPageBreak(false);
define('FPDF_FONTPATH', dirname(__FILE__) . '/noauto/fonts/');
$pdf->AddFont('Gill', '', 'GillSansMTPro-Medium.php');
$pdf->AddFont('Gill', 'B', 'GillSansMTPro-Heavy.php');
$pdf->AddFont('GillBook', '', 'GillSansMTPro-Book.php');
$pdf->SetFont('Gill', '', 16);
$data = $this->loadItems();
$count = 0;
$sign = 0;
$width = 53.975;
$height = 68.95999999999999;
$top = 20;
$left = 5.175;
$effective_width = $width - 2 * $left;
$pdf->SetDrawColor(0, 0, 0);
$pdf->SetLineWidth(0.2);
foreach ($data as $item) {
if ($count % 16 == 0) {
$pdf->AddPage();
// draw tick marks for cutting
$pdf->Line(2, $height + 1.5, 6, $height + 1.5);
$pdf->Line(2, 2 * $height + 1.5, 6, 2 * $height + 1.5);
$pdf->Line(2, 3 * $height + 1.5, 6, 3 * $height + 1.5);
$pdf->Line($width, 2, $width, 6);
$pdf->Line(2 * $width, 2, 2 * $width, 6);
$pdf->Line(3 * $width, 2, 3 * $width, 6);
$pdf->Line($width, 4 * $height - 4, $width, 4 * $height);
$pdf->Line(2 * $width, 4 * $height - 4, 2 * $width, 4 * $height);
$pdf->Line(3 * $width, 4 * $height - 4, 3 * $width, 4 * $height);
$pdf->Line(4 * $width - 6, $height + 1.5, 4 * $width - 2, $height + 1.5);
$pdf->Line(4 * $width - 6, 2 * $height + 1.5, 4 * $width - 2, 2 * $height + 1.5);
$pdf->Line(4 * $width - 6, 3 * $height + 1.5, 4 * $width - 2, 3 * $height + 1.5);
$sign = 0;
}
$row = floor($sign / 4);
$column = $sign % 4;
$price = $item['normal_price'];
if ($item['scale']) {
if (substr($price, 0, 1) != '$') {
$price = sprintf('$%.2f', $price);
}
$price .= ' /lb.';
} elseif (isset($item['signMultiplier'])) {
$price = $this->formatPrice($item['normal_price'], $item['signMultiplier']);
} else {
$price = $this->formatPrice($item['normal_price']);
}
$pdf->Image(dirname(__FILE__) . '/cd_head_16.png', $left - 2 + $width * $column, $top - 17 + $row * $height, $width - 6);
$pdf->SetXY($left + $width * $column, $top + $row * $height - 2);
$pdf->SetFont('Gill', 'B', $this->SMALL_FONT);
$font_shrink = 0;
while (true) {
$pdf->SetX($left + $width * $column);
$y = $pdf->GetY();
$pdf->MultiCell($effective_width, 6, strtoupper($item['brand']), 0, 'C');
if ($pdf->GetY() - $y > 6) {
$pdf->SetFillColor(0xff, 0xff, 0xff);
$pdf->Rect($left + $width * $column, $y, $left + $width * $column + $effective_width, $pdf->GetY(), 'F');
$font_shrink++;
if ($font_shrink >= $this->SMALL_FONT) {
break;
}
$pdf->SetFontSize($this->MED_FONT - $font_shrink);
$pdf->SetXY($left + $width * $column, $y);
} else {
break;
}
}
$pdf->SetX($left + $width * $column);
$pdf->SetFont('Gill', '', $this->MED_FONT);
$font_shrink = 0;
while (true) {
$pdf->SetX($left + $width * $column);
$y = $pdf->GetY();
$pdf->MultiCell($effective_width, 6, $item['description'], 0, 'C');
if ($pdf->GetY() - $y > 12) {
$pdf->SetFillColor(0xff, 0xff, 0xff);
$pdf->Rect($left + $width * $column, $y, $left + $width * $column + $effective_width, $pdf->GetY(), 'F');
$font_shrink++;
if ($font_shrink >= $this->MED_FONT) {
break;
}
$pdf->SetFontSize($this->MED_FONT - $font_shrink);
$pdf->SetXY($left + $width * $column, $y);
} else {
if ($pdf->GetY() - $y < 12) {
$words = explode(' ', $item['description']);
$multi = '';
for ($i = 0; $i < floor(count($words) / 2); $i++) {
$multi .= $words[$i] . ' ';
}
$multi = trim($multi) . "\n";
for ($i = floor(count($words) / 2); $i < count($words); $i++) {
$multi .= $words[$i] . ' ';
}
$item['description'] = trim($multi);
//.........这里部分代码省略.........
示例3: save
/**
* Save PHPExcel to file
*
* @param string $pFileName
* @throws Exception
*/
public function save($pFilename = null) {
// Open file
global $cnf;
$pFilename= $cnf['path']['Temp'] . $pFilename;
$fileHandle = fopen($pFilename, 'w');
if ($fileHandle === false) {
throw new Exception("Could not open file $pFilename for writing.");
}
// Fetch sheets
$sheets = array();
if (is_null($this->_sheetIndex)) {
$sheets = $this->_phpExcel->getAllSheets();
} else {
$sheets[] = $this->_phpExcel->getSheet($this->_sheetIndex);
}
// PDF paper size
$paperSize = 'A4';
// Create PDF
$pdf = new FPDF('P', 'pt', $paperSize);
// Loop all sheets
foreach ($sheets as $sheet) {
// PDF orientation
$orientation = 'P';
if ($sheet->getPageSetup()->getOrientation() == PHPExcel_Worksheet_PageSetup::ORIENTATION_LANDSCAPE) {
$orientation = 'L';
}
// Start sheet
$pdf->SetAutoPageBreak(true);
$pdf->SetFont('Arial', '', 10);
$pdf->AddPage($orientation);
// Get worksheet dimension
$dimension = explode(':', $sheet->calculateWorksheetDimension());
$dimension[0] = PHPExcel_Cell::coordinateFromString($dimension[0]);
$dimension[0][0] = PHPExcel_Cell::columnIndexFromString($dimension[0][0]) - 1;
$dimension[1] = PHPExcel_Cell::coordinateFromString($dimension[1]);
$dimension[1][0] = PHPExcel_Cell::columnIndexFromString($dimension[1][0]) - 1;
// Calculate column widths
$sheet->calculateColumnWidths();
// Loop trough cells
for ($row = $dimension[0][1]; $row <= $dimension[1][1]; $row++) {
// Line height
$lineHeight = 0;
// Calulate line height
for ($column = $dimension[0][0]; $column <= $dimension[1][0]; $column++) {
$rowDimension = $sheet->getRowDimension($row);
$cellHeight = PHPExcel_Shared_Drawing::pixelsToPoints(
PHPExcel_Shared_Drawing::cellDimensionToPixels($rowDimension->getRowHeight())
);
if ($cellHeight <= 0) {
$cellHeight = PHPExcel_Shared_Drawing::pixelsToPoints(
PHPExcel_Shared_Drawing::cellDimensionToPixels($sheet->getDefaultRowDimension()->getRowHeight())
);
}
if ($cellHeight <= 0) {
$cellHeight = $sheet->getStyleByColumnAndRow($column, $row)->getFont()->getSize();
}
if ($cellHeight > $lineHeight) {
$lineHeight = $cellHeight;
}
}
// Output values
for ($column = $dimension[0][0]; $column <= $dimension[1][0]; $column++) {
// Start with defaults...
$pdf->SetFont('Arial', '', 10);
$pdf->SetTextColor(0, 0, 0);
$pdf->SetDrawColor(100, 100, 100);
$pdf->SetFillColor(255, 255, 255);
// Coordinates
$startX = $pdf->GetX();
$startY = $pdf->GetY();
// Cell exists?
$cellData = '';
if ($sheet->cellExistsByColumnAndRow($column, $row)) {
if ($sheet->getCellByColumnAndRow($column, $row)->getValue() instanceof PHPExcel_RichText) {
$cellData = $sheet->getCellByColumnAndRow($column, $row)->getValue()->getPlainText();
} else {
if ($this->_preCalculateFormulas) {
$cellData = PHPExcel_Style_NumberFormat::ToFormattedString(
$sheet->getCellByColumnAndRow($column, $row)->getCalculatedValue(),
$sheet->getstyle( $sheet->getCellByColumnAndRow($column, $row)->getCoordinate() )->getNumberFormat()->getFormatCode()
);
//.........这里部分代码省略.........
示例4: FPDF
$name = $_POST['name'];
$characteristics = $_POST['characteristics'];
$image = $_POST['image'];
require 'fpdf17/fpdf.php';
//create a FPDF object
$pdf = new FPDF();
//set document properties
$pdf->SetAuthor('Anon');
$pdf->SetTitle($name);
//set font for the entire document
$pdf->SetFont('Helvetica', 'B', 20);
$pdf->SetTextColor(50, 60, 100);
//set up a page
$pdf->AddPage('P');
//$pdf->SetDisplayMode(real,'default');
//insert an image and make it a link
$pdf->Image('logo.png', 10, 20, 33, 0);
//display the title without a border around it
$pdf->SetXY(50, 20);
$pdf->SetDrawColor(50, 60, 100);
$pdf->Cell(100, 10, $name, 0, 0, 'C', 0);
// Insert a dynamic image from a URL
$pdf->Image($image, 75, 30, 0, 50);
//Set x and y position for the main text, reduce font size and write content
$pdf->SetXY(10, 90);
$pdf->SetFontSize(10);
$pdf->Write(5, $characteristics);
//Output the document
$pdf->Output();
?>
示例5: SetDrawColor
function SetDrawColor($r, $g = -1, $b = -1)
{
if (is_string($r)) {
$this->HTML2RGB($r, $r, $g, $b);
}
parent::SetDrawColor($r, $g, $b);
}
示例6: SetDrawColor
function SetDrawColor($a, $b = null, $c = null)
{
if (is_array($a)) {
$b = $a[1];
$c = $a[2];
$a = $a[0];
}
if ($b == null) {
$b = $c = $a;
}
return parent::SetDrawColor($a, $b, $c);
}
示例7: SetDrawColor
public function SetDrawColor($r, $g = null, $b = null)
{
$c = $this->parseColours($r, $g, $b);
return parent::SetDrawColor($c["red"], $c["green"], $c["blue"]);
}
示例8: nominapago
//------------------------ Agregar el imss de forma automatica --------------------
/*
$conexion_extra= mysqli_connect("localhost", "adminnomina", "GNgOLWSQR780", "nominacetic", "3606");
$PA=mysqli_query($conexion_extra,"CALL calcula_imss('$ren[id]','$quincena',@sec)");
$row=mysqli_fetch_array($PA);
$importe_imss=$row['total'];
mysqli_close($conexion_extra);
$insert="INSERT INTO nominapago(idnominaemp,cve_concepto,importe,tipo,quincena,anio,fechaemision,usuario,cve_sat,idarea)
VALUES('$ren[id]','274','$importe_imss','D','$quincena',YEAR(NOW()),CURDATE(),'2','021','$ren[ur]')";
mysql_query($insert,$conexion);*/
//-------------------------------------------------------------------------------------
if($otraur != $ren["ur"])
{
$pdf->SetTextColor(0);
$pdf->SetDrawColor(0,0,0);
$pdf->SetLineWidth(.2);
$pdf->cell(57,7,"SUBTOTAL ($emp)", 1, 0, 'C');
$pdf->cell(22,7,number_format($Ssueldobase, 2, ".", ","), 1, 0, 'R');
$pdf->cell(22,7,number_format($Scompensacion, 2, ".", ","), 1, 0, 'R');
$pdf->cell(22,7,number_format($Sprima, 2, ".", ","), 1, 0, 'R');
$pdf->cell(20,7,number_format($Saguinaldo, 2, ".", ","), 1, 0, 'R');
$pdf->cell(22,7,number_format($Sotrasper, 2, ".", ","), 1, 0, 'R');
$pdf->cell(17,7,number_format($Sisr, 2, ".", ","), 1, 0, 'R');
$pdf->cell(17,7,number_format($Simss, 2, ".", ","), 1, 0, 'R');
$pdf->cell(22,7,number_format($Sotrasded, 2, ".", ","), 1, 0, 'R');
$pdf->cell(22,7,number_format($Sneto, 2, ".", ","), 1, 0, 'R');
$Ssueldobase = 0;
$Scompensacion = 0;
示例9: strtotime
// Infos de la commande calées à gauche
$pdf->Text(20, 80, 'N° de facture : '.$tCommande[0]['id']);
$pdf->Text(20, 85, 'N° de client : '.$tCommande[0]['idClient']);
// Infos du client calées à droite
$pdf->Text(120, 50, $tClient['nomClient'].' '.$tClient['prenomClient']);
$pdf->Text(120, 55, $tClient['adresseClient']);
$pdf->Text(120, 60, $tClient['cpClient'].' '.$tClient['villeClient']);
// Infos date
$pdf->Text(120, 80, 'Buire, le '.date("d-m-Y", strtotime($tCommande[0]['dateFacture'])));
/* --- Tableau détail commande --- */
// en-tête
$pdf->SetDrawColor(183); // couleur du fond
$pdf->SetFillColor(221); // couleur des filets
$pdf->SetTextColor(0); // couleur du texte
$pdf->SetY(100);
$pdf->SetX(20);
$pdf->Cell(80, 10, 'Description du produit', 1, 0, 'L', 1);
$pdf->SetX(100);
$pdf->Cell(20, 10, 'Quantité', 1, 0, 'C', 1);
$pdf->SetX(120);
$pdf->Cell(35, 10, 'Prix unitaire HT', 1, 0, 'C', 1);
$pdf->SetX(155);
$pdf->Cell(30, 10, 'Montant HT', 1, 0, 'C', 1);
$pdf->Ln(); // retour à la ligne
// détail commande
$positionLigne = 110;
示例10: FPDF
$wprintable_BAD_REPLACE = $xMarginRight - $wBorderPicture - $xLeftTextMargin;
$hUnderlineOffset = 7.15;
$wSpace = 5;
$hTwoLinesOffset = 5.5;
//***************
//** PDF Build **
//***************
require_once "resources/includePath.inc";
require 'fpdf17/fpdf.php';
$pdf = new FPDF();
//default to mm units
$pdf->AddFont('Porcelain', '', 'Porcelain.php');
$pdf->AddFont('DemiTasse', '', 'DemiTasse.php');
$pdf->AddPage('P', 'Letter');
//** Draw Page Outline Box **
$pdf->SetDrawColor(230, 230, 230);
$pdf->Rect($xMarginLeft, $yMarginTop, $xMarginRight - $xMarginLeft, $yMarginBottom - $yMarginTop);
//*************************
//** Write Page Elements **
//*************************
//** Images **
$imgScaleBorder = 97;
$imgScaleWatermark = 75;
$imgSpacingBorder = 1.5;
$pdf->Image('resources/certificates/border_L.png', $xMarginLeft + $imgSpacingBorder, $yMarginTop + $imgSpacingBorder, $imgScaleBorder);
$pdf->Image('resources/certificates/watermark_light.png', ($wTextArea - $imgScaleWatermark) / 2 + $xLeftTextMargin, $yMarginTop + 7, $imgScaleWatermark);
$pdf->Image('resources/certificates/border_R.png', $xMarginRight - $imgSpacingBorder - $imgScaleBorder, $yMarginBottom - $imgSpacingBorder - $imgScaleBorder, $imgScaleBorder);
//** Title **
$yLine = $yMarginTop + 16;
$pdf->SetFont('Porcelain', '', 42);
$pdf->SetY($yLine);
示例11:
function set_draw_color($r, $g, $b)
{
parent::SetDrawColor($r, $g, $b);
}
示例12: using
$sql = mysql_query("SELECT @row_num := @row_num + 1 as id ,kehadiran.nak,nama,nik,status,no_kupon,id_kuasa,user,waktu from kehadiran join anggota using (nak) order by id");
$data = array();
while ($row = mysql_fetch_assoc($sql)) {
array_push($data, $row);
}
$judul = "LAPORAN KEHADIRAN";
$header = array(array("label" => "No", "length" => 10, "align" => "L"), array("label" => "NAK", "length" => 10, "align" => "L"), array("label" => "Nama", "length" => 44, "align" => "L"), array("label" => "NIK", "length" => 15, "align" => "L"), array("label" => "Status", "length" => 15, "align" => "L"), array("label" => "No Kupon", "length" => 17, "align" => "L"), array("label" => "Id Kuasa", "length" => 15, "align" => "L"), array("label" => "User", "length" => 38, "align" => "L"), array("label" => "Waktu", "length" => 31, "align" => "L"));
require_once "fpdf/fpdf.php";
$pdf = new FPDF('P', 'mm', 'A4');
$pdf->AddPage();
$pdf->SetFont('Arial', 'B', '16');
$pdf->Cell(0, 20, $judul, '0', 1, 'C');
$pdf->SetFont('Arial', '', '9');
$pdf->SetFillColor(0, 0, 0);
$pdf->SetTextColor(255);
$pdf->SetDrawColor(0, 0, 0);
foreach ($header as $kolom) {
$pdf->Cell($kolom['length'], 5, $kolom['label'], 1, '0', $kolom['align'], true);
}
$pdf->Ln();
$pdf->SetFillColor(255, 255, 255);
$pdf->SetTextColor(0);
$pdf->SetFont('');
$fill = false;
foreach ($data as $baris) {
$i = 0;
foreach ($baris as $cell) {
$pdf->Cell($header[$i]['length'], 5, $cell, 1, '0', $kolom['align'], $fill);
$i++;
}
$fill = !$fill;
示例13:
$pdf->SetAutoPageBreak(auto, 3);
//$pdf->Ln(10);
//include ("../conectar.php");
$codfactura = $_GET["codfactura"];
$consulta = "Select * from facturas,clientes where facturas.codfactura='{$codfactura}' and facturas.codcliente=clientes.codcliente";
$resultado = mysql_query($consulta, $conexion);
$lafila = mysql_fetch_array($resultado);
/*Fijo la línea de comienzo*/
if ($lafila["moneda"] == 2) {
$moneda = "dolar.png";
} else {
$moneda = "pesos.png";
}
$pdf->SetFillColor(255, 255, 255);
$pdf->SetTextColor(0);
$pdf->SetDrawColor(0, 0, 0);
$pdf->SetLineWidth(0.2);
$pdf->SetFont('Arial', 'I', 9);
$pdf->Cell(5);
/* ubicación inicial de la celdas */
$pdf->Cell(50, 4, 'FERNANDO GÁMBARO ÁLVAREZ', 0, 0, 'C', 1);
$pdf->Image('logo/logo_simple.jpg', 12, 10, -140);
$pdf->Cell(100);
/* ubicación inicial de la celdas */
$pdf->SetFont('Arial', '', 8);
$pdf->Cell(50, 4, 'RUT 214355250015', 0, 0, 'C', 1);
$pdf->Ln(10);
/* Establezco el color de las celdas y tipo de letra */
$pdf->SetFillColor(134, 16, 16);
$pdf->SetTextColor(255);
$pdf->SetDrawColor(0, 0, 0);
示例14:
$pdf->Cell(0, 0, $row["MASA_DECLARADO"], 0, 0, "R");
$pdf->Ln(4);
$pdf->SetFont("Arial", "B", 8);
$pdf->Cell(48, 0, "Alícuota fija declarada por trabajador");
$pdf->SetFont("Arial", "", 8);
$pdf->Cell(48, 0, $row["ALICUOTA_FIJA_T"]);
$pdf->SetFont("Arial", "B", 8);
$pdf->Cell(68, 0, "Alícuota variable declarada sobre la masa salarial");
$pdf->SetFont("Arial", "", 8);
$pdf->Cell(26, 0, "% ".$row["ALICUOTA_VAR_T"], 0, 0, "R");
$pdf->SetDrawColor(0, 0, 0);
$pdf->Rect(10, 34, 190, 4);
$pdf->Rect(10, 38, 190, 16);
$pdf->Rect(10, 54, 190, 4);
$pdf->Rect(10, 62, 190, 4);
$pdf->Rect(10, 66, 190, 12);
$pdf->Rect(10, 82, 190, 4);
$pdf->Rect(10, 86, 190, 12);
$pdf->Ln(6);
$pdf->Cell(-1);
$pdf->SetFont("Arial", "B", 8);
$pdf->Cell(80, 0, "Concepto");
$pdf->Cell(40, 0, "Débito");
$pdf->Cell(40, 0, "Crédito");
示例15:
#
$pdf->SetFont('Arial','B','16');
#
$pdf->Cell(0,20, $judul, '0', 1, 'C');
#
#
#buat header tabel
#
$pdf->SetFont('Arial','','10');
#
$pdf->SetFillColor(65,65,65);
#
$pdf->SetTextColor(255);
#
$pdf->SetDrawColor(128,0,0);
#
$pdf->Cell(10, 5, 'NO', 1, '0', 'C', true);
#
foreach ($header as $kolom) {
#
$pdf->Cell($kolom['length'], 5, $kolom['label'], 1, '0', $kolom['align'], true);
#
}
#
$pdf->Ln();
#
$no2=1;
#
#tampilkan data tabelnya
#