Mohamed Musthafa
Mohamed Musthafa

Reputation: 41

how to multicell remove border in fpdf?

I set Default value: 0. bet border will be displayed.. how to overcome this problem? Please tell me...

  while ($row = $result->fetch_row()) 
  {
  for ($i = 0; $i < 11; $i++) 
        {
        $pdf->SetXY($x, $y);
        $pdf->Rect($x, $y, $widths[$i], $row_height);
        $pdf->MultiCell($widths[$i], $line_height,
        iconv('UTF-8', 'windows-1252', $row[$i]), 0, 'L');
        $x += $widths[$i];
    }
   }

Upvotes: 1

Views: 7499

Answers (4)

Olaewe Olufemi
Olaewe Olufemi

Reputation: 1

Modify your code as indicated below.

while ($row = $result->fetch_row()) 
{
    for ($i = 0; $i < 11; $i++) 
    {
        $pdf->SetXY($x, $y);
        //$pdf->Rect($x, $y, $widths[$i], $row_height);
        $pdf->MultiCell($widths[$i], $line_height,
        iconv('UTF-8', 'windows-1252', $row[$i]), 0, 'L');
        $x += $widths[$i];
    }
}

Upvotes: 0

Mateus Gon&#231;alves
Mateus Gon&#231;alves

Reputation: 706

Put in the EDGE location the value of 0enter image description here

1 : All borders - 0 : No Border - L : Only Left boarder - RT: Only Right and Top Border - BTL: Only Bottom Top and Left side - You can continue with other combinations of the borders.

Upvotes: 2

Jan Slabon
Jan Slabon

Reputation: 5058

The border you see is created by the Rect() call before.

Upvotes: 1

Mohammed Safeer
Mohammed Safeer

Reputation: 21535

Multicell Default border value is 0. Unless we specifying border as 1 , it will not display any border.

MultiCell(float w, float h, string txt [, mixed border [, string align [, boolean fill]]])

Refer FPDF documentation on Multicell http://www.fpdf.org/en/doc/multicell.htm

In the above question no border for multicell, so it will not display any border. But there is a rectangle, that displays the border.

Rect(float x, float y, float w, float h [, string style]) 

Refer FPDF documentation on Rect http://www.fpdf.org/en/doc/rect.htm

Upvotes: 1

Related Questions