Is there any way to align justified text in PhpWord?

0

I would like to align a text with phpWord as follows:

$doc->addText('Meu texto justificado', array('size' => 9), array('align' => 'justify' )

But it does not align the text, I saw that instead of justify I can use both but also did not get the justified result. Align left and right work. Is there no way to justify a text in phpWord?

    
asked by anonymous 06.04.2016 / 17:50

1 answer

1

For what I found on the internet, there is no justify parameter.

If you enter the directory src\PhpWord\SimpleType\Jc.php you will find:

const START = 'start';
const CENTER = 'center';
const END = 'end';
const BOTH = 'both';
const MEDIUM_KASHIDA = 'mediumKashida';
const DISTRIBUTE = 'distribute';
const NUM_TAB = 'numTab';
const HIGH_KASHIDA = 'highKashida';
const LOW_KASHIDA = 'lowKashida';
const THAI_DISTRIBUTE = 'thaiDistribute';

The option that comes closest to justify is distribute , if I'm not mistaken the problem will be in the last line.

Try and give me a feedback

    
06.04.2016 / 18:14