本文整理汇总了PHP中PDFReport::SetTextColor方法的典型用法代码示例。如果您正苦于以下问题:PHP PDFReport::SetTextColor方法的具体用法?PHP PDFReport::SetTextColor怎么用?PHP PDFReport::SetTextColor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PDFReport
的用法示例。
在下文中一共展示了PDFReport::SetTextColor方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: DBExecSql
$params[":orden"] = $_SESSION["ReportesSiniestros"]["ORDEN"];
$stmt = DBExecSql($conn, $sql, $params);
//-----------------------------------------------------------------------
if (DBGetRecordCount($stmt) == 0) {
echo "La consulta no devolviò datos.";
exit;
}
$rowCabecera = DBGetQuery($stmt, 1, false);
//-----------------------------------------------------------------------
// $pdf->setSourceFile($_SERVER["DOCUMENT_ROOT"]."/modules/varios/templates/ListadoJuiciosVerticalBlanco.pdf");
$stmt = DBExecSql($conn, $sql, $params);
$pdf->SetAutoPageBreak(true, 20);
$pdf->AddPage('P', 'Legal');
while ($row = DBGetQuery($stmt, 1, false)) {
$pdf->SetX($pdf->margenDerecho);
$pdf->SetTextColor(0, 0, 0);
$pdf->SetFontAlignGeneral();
$Newrow = array_values($row);
$pdf->Row($Newrow);
$pdf->LineaSepara();
}
unset($_SESSION['ReportesSiniestros']["ReporteDatosdelaEmpresa"]);
// enviamos cabezales http para no tener problemas
header('Content-Type: text/html; charset=UTF-8');
//header('Content-Type: text/html; charset=iso-8859-1');
header("Content-Transfer-Encoding", "binary");
//header('Cache-Control: maxage=3600');
header('Cache-Control: private, max-age=0, must-revalidate');
header('Pragma: public');
$pdf->Output('ReporteDatosdelaEmpresa.pdf', 'I');
// DBCommit($conn);
示例2: foreach
if ($count == 1) {
$lineSelect = 2;
}
$changeColor = 0;
$pdf->SetFormatCell(array());
foreach ($rown as $val) {
$pdf->SetAligns('L');
$pdf->SetDibujaFondoTexto(false);
if ($lineSelect == 0) {
$pdf->SetFontAlignGeneral(1);
$pdf->SetDibujaFondo(true);
$pdf->SetFont('Arial', 'I', 14);
$pdf->SetAltoLinea(7);
$pdf->SetX(5);
$pdf->SetFillColor(192, 192, 192);
$pdf->SetTextColor(0, 0, 0);
$changeColor = 0;
$iline = 0;
}
if ($lineSelect == 1) {
$pdf->SetX(5);
$pdf->SetFontAlignGeneral(2);
$pdf->SetAltoLinea(5);
$pdf->SetFillColor(192, 192, 192);
$pdf->SetTextColor(255, 255, 255);
$pdf->SetFont('Arial', 'B', 7);
}
if ($lineSelect >= 2) {
$pdf->SetX(5);
$pdf->SetFontAlignGeneral(2);
$pdf->SetDibujaFondo(false);