Answer the question
In order to leave comments, you need to log in
How to work with Word Template Engine correctly?
https://github.com/philip-sorokin/word-template-engine
<?php
// Подключите библиотеку
require_once 'WordTemplateEngine.php';
$doc = '/var/www/file.docx';
$template = new WordTemplateEngine($doc);
$varName = 'name';
$replacement = 'Мое новое имя';
$template->setValue($varName, $replacement);
$template->save('/var/www/file_new.pdf', 'pdf');
$template->output('pdf', 'Invoice 777', true);
?>
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