0
I would like to align a text with phpWord as follows:
$doc->addText('Meu texto justificado', array('size' => 9), array('align' => 'justify'
)
But he doesn’t line up the text, I saw that instead of justify
can I use the both
but I also did not get the result justified. Left and right align work. There is no way to justify a text in phpWord?
Actually, Distribute lines up but the last line goes wrong. But Both works perfectly when using the main Section. That’s why mine is not working, because I have this alignment in a Section created with createTextRun(), and then it does not accept the formatting. I need this createTextRun() because I have to bold key words inside the text.
– Leandro
I was able to justify by passing the style inside the createTextRun() method, as follows: $doc = $Section->createTextRun(array('align' => 'Both')); , so it puts the entire $doc session in the past format.
– Leandro
@Leandro glad you made it.
– Leonardo Coelho