isdoo Posted May 7, 2009 Share Posted May 7, 2009 Okay - this has me stumped!! Could any suggest why this is happening. (It used to work fine until a version or two back and still is not correct in version 4. This is part of the code that we have in place.... if ($status=="Cancelled") { $pdf->SetXY(10,225); $pdf->SetTextColor(0, 0, 205); $pdf->SetFont('Arial','B',6.5); # Use 6.5pt Text $pdf->MultiCell(180, 3, "Invoice Cancelled:", 0, 'L'); $pdf->SetFont('Arial','',6.5); # Use 6.5pt Text $pdf->MultiCell(180, 3, "We have cancelled your invoice number $invoicenum.\n\nIf you have any queries, please email xxxxx@xxxx.com", 0, 'L'); } elseif ($status=="Paid") { $pdf->SetXY(10,225); $pdf->SetTextColor(0, 0, 205); $pdf->SetFont('Arial','B',6.5); # Use 6.5pt Text $pdf->MultiCell(180, 3, "Thank you for your payment:", 0, 'L'); $pdf->SetFont('Arial','',6.5); # Use 6.5pt Text $pdf->MultiCell(180, 3, "Many thanks for your payment, which we have credited to your invoice number $invoicenum. \n\nIf you have any queries on your account please email xxxxx@xxxx.com", 0, 'L'); } However the first line in each block is being displayed starting in the left margin, with the subsequent lines correctly displayed in line with the rest of the page. It is not the 'B' that is throwing it out as in the unpaid section, I have addtional bold lines, which are inline with the rest of the text. It is purely the first line that is shown further to the left. I am baffled! Thanks in advance. 0 Quote Link to comment Share on other sites More sharing options...
sparky Posted May 7, 2009 Share Posted May 7, 2009 Try this if ($status=="Cancelled") { $pdf->SetXY(10,225); $pdf->SetTextColor(0, 0, 205); $pdf->SetFont('Arial','B',6.5); # Use 6.5pt Text $pdf->MultiCell(180, 3, "Invoice Cancelled:", 0, 'L', 0, 2); $pdf->SetFont('Arial','',6.5); # Use 6.5pt Text $pdf->MultiCell(180, 3, "We have cancelled your invoice number $invoicenum.\n\nIf you have any queries, please email xxxxx@xxxx.com", 0, 'L'); } elseif ($status=="Paid") { $pdf->SetXY(10,225); $pdf->SetTextColor(0, 0, 205); $pdf->SetFont('Arial','B',6.5); # Use 6.5pt Text $pdf->MultiCell(180, 3, "Thank you for your payment:", 0, 'L', 0, 2); $pdf->SetFont('Arial','',6.5); # Use 6.5pt Text $pdf->MultiCell(180, 3, "Many thanks for your payment, which we have credited to your invoice number $invoicenum. \n\nIf you have any queries on your account please email xxxxx@xxxx.com", 0, 'L'); } 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.