Jump to content

logo image for pdf invocices


Recommended Posts

This is what I did:

 

} elseif ($status=="Unpaid") {

$pdf->SetTextColor(204 ) ;

$pdf->SetXY(120,80);

 

$statustext = $_LANG["invoicesunpaid"];

 

} elseif ($status=="Paid") {

$pdf->SetTextColor(119,149 ) ;

$pdf->SetXY(120,80);

 

$statustext = $_LANG["invoicespaid"];

 

}

 

However it does not work as when invoices are viewed, the display a blank page. What am I doing wrong here?

Link to comment
Share on other sites

Only thing I can see what might cause a problem is :

$pdf->SetTextColor(119,149 ) ;

 

should probably read $pdf->SetTextColor(0, 119,149 ) ; or

$pdf->SetTextColor(119 ) ;

 

SetTextColor accepts 1 or three values

 

SetTextColor(int r [, int g, int b])

Parameters

r

If g and b are given, red component; if not, indicates the gray level. Value between 0 and 255.

 

g

Green component (between 0 and 255).

 

b

Blue component (between 0 and 255).

Link to comment
Share on other sites

Try:

 

if ($status=="Cancelled") {
$pdf->SetTextColor(173, 173, 173);
$pdf->SetXY(80,80);
$statustext = $_LANG["invoicescancelled"];
} elseif ($status=="Unpaid") {
$pdf->SetTextColor(205,38,38);
$pdf->SetXY(120,80);
$statustext = $_LANG["invoicesunpaid"];
} elseif ($status=="Paid") {
 $pdf->SetTextColor(154,205,50);
$pdf->SetXY(120,80);
$statustext = $_LANG["invoicespaid"];
}
$pdf->SetFont('Arial','B',40);
//$pdf->SetTextColor(245);
//$pdf->SetTextColor(173, 173, 173);
$pdf->Write(5,strtoupper($statustext));

Link to comment
Share on other sites

  • 2 months later...
This is what I did:

 

 

 

However it does not work as when invoices are viewed, the display a blank page. What am I doing wrong here?

Thanks it works for me.

 

Only for me $pdf->SetXY(80,80); (Dutch words are to long)

Link to comment
Share on other sites

  • 2 years later...

Whih File I will change ? Where Is the File ?

 

 

 

Try:

 

if ($status=="Cancelled") {
$pdf->SetTextColor(173, 173, 173);
$pdf->SetXY(80,80);
$statustext = $_LANG["invoicescancelled"];
} elseif ($status=="Unpaid") {
$pdf->SetTextColor(205,38,38);
$pdf->SetXY(120,80);
$statustext = $_LANG["invoicesunpaid"];
} elseif ($status=="Paid") {
 $pdf->SetTextColor(154,205,50);
$pdf->SetXY(120,80);
$statustext = $_LANG["invoicespaid"];
}
$pdf->SetFont('Arial','B',40);
//$pdf->SetTextColor(245);
//$pdf->SetTextColor(173, 173, 173);
$pdf->Write(5,strtoupper($statustext));

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated