Answer the question
In order to leave comments, you need to log in
How to make a string (text) left-aligned using PHPWord?
I am using phpword to generate docx from a template. For example:
$document->setValue('zamena', '<w:br/>Текст для замены.<w:br/>');
this code finds the variable in the ${zamena} docx file and replaces it with the replacement text. $phpWord->addParagraphStyle('Paragraph', array('bold' => true , 'align' => 'center' ));
and i get an errorFatal error: Uncaught Error: Call to a member function addParagraphStyle() on null in /home/users/...
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question