Write a new line in a RichText String

Sep 5, 2011 at 7:05 PM

I can´t write a new line in a richtext string.. Im trying this:

 

$objPayable = $objRichText->createTextRun('\nNew Respon 1\nNew Respon 1\nNew Respon 1\nNew Respon 1');

  $objPayable->getFont()->setColor($color);

 

it always writes '\n' char in the cell instead new line... =/

Sep 6, 2011 at 1:23 PM

Try double-quotes instead...

$objPayable = $objRichText->createTextRun("\nNew Respon 1\nNew Respon 1\nNew Respon 1\nNew Respon 1");

Sep 6, 2011 at 3:30 PM

thanks scott

the only problem now is that a strange character is printed when "\n" starts the string. 

although the line break is working now.