0

enter image description here

SetDrawColor() supposed to color Cell frame but instead another color is rendering as background color. This is the whole code :-

    $pdf = new FPDF();
    $pdf->SetTextColor(103, 58, 183);
    $pdf->SetDrawColor(0, 80, 180);
    // Fourth Page --
    $pdf->AddPage();
    $pdf->SetFont('Arial','B',16);
    $pdf->Cell(0, 10, "Hello Santanu", 1, 1, 'C', true);

    $pdf->Output('helo.pdf', 'D');
Harkamal
  • 496
  • 3
  • 12
santanu bera
  • 1,281
  • 10
  • 16

1 Answers1

0

You should try using SetFillColor before drawing any cell because it's taking black as default.

$pdf->SetFillColor(0, 0, 0);
Lovepreet Singh
  • 4,792
  • 1
  • 18
  • 36