यह एक छोटी सी चाल के साथ संभव है। मैं सिर्फ यह 2 कोशिकाओं, एक दूसरे के ऊपर मुद्रण, इस तरह बनाया:
//Setting the text color to black
$pdf->SetTextColor(0,0,0);
//Printing my cell
$pdf->SetFont('Arial','B');
$pdf->Cell(55,5,"Black Text ",1,0,'C');
$pdf->SetXY($coordXbase,$coordY);
//Setting the text color to red
$pdf->SetTextColor(194,8,8);
//Printing another cell, over the other
$pdf->SetFont('Arial','B');
//Give some space from the left border, and print the red text after the black text that is in the cell behind this one.
$pdf->Cell(55,5," Red Text",0,0,'C');
$pdf->SetXY($coordXbase,$coordY);
//Setting the text color back to back, in the next cells.
$pdf->SetTextColor(0,0,0);
परिणाम था इस:
के रूप में मैं एक छोटे से भीड़ थी, मैं बनाने के लिए समय नहीं था इसके साथ मदद करने के लिए कुछ फ़ंक्शन, लेकिन यह एक अच्छा प्रारंभिक बिंदु विचार होगा :)
पीएस: बताएं कि क्या आपको लोगों को एक आसान तरीका मिल रहा है।
स्रोत
2013-06-29 13:22:56
ठीक है। आपके प्रश्न के लिए धन्यवाद। –
क्या यह लिंक एक सुराग नहीं दे सकता है? http://stackoverflow.com/questions/3477372/make-text-wrap-in-a-cell-with-fpdf – hmatar
लेकिन मैं इस से उलझन में हूं क्योंकि मैं अभी भी इसे एक पंक्ति पर रहना चाहता हूं। मैं केवल पाठ रंग के लिए एक दृश्य अंतर बनाने के लिए देख रहा हूँ। शायद मैं कुछ गलत पढ़ा। –