Kelpie
Kelpie

Reputation: 365

FPDF Cell with custom border

I wanted to show data with custom position. the currency is align left and the number align right.

So i'm trying to make a cell that looks like 1 cell but it's made of 2 cell .

Here is part of my code

$pdf->Cell(5, 10, ' $ ', 'L', 0, 'L');
$pdf->Cell(45, 10, $r_purchases_t['purchase_total'], 'R', 0, 'R');

It's result is this :

|$         10,000.00|

Problem : It has no bottom border,how can i make custom cell border just left and bottom side ?

If possible, i want some code like $pdf->Cell(5, 10, ' $ ', 'L'||'B', 0, 'L');

Upvotes: 0

Views: 16153

Answers (2)

Haris
Haris

Reputation: 81

$pdf->Cell(45, 10, ' $ '. $r_purchases_t['purchase_total'], 'L', 0, 'L');

Try This and adjust width of cell accordin to need.

Upvotes: 0

Kelpie
Kelpie

Reputation: 365

SOLVED, Apparently you can just combine border using , in border parameter.

So to add left and bottom border of the cell just using this code $pdf->Cell(5, 10, ' $ ', 'L,B', 0, 'L');

Upvotes: 3

Related Questions