Forum


Replies: 5   Views: 2700
How to place different qr-codes to pages in a docx-document?
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by alex_passionfive  · 06-05-2019 - 14:17

Sorry. I don't understand, what you mean. I have a docx-template with the placeholder $body$. And $body$ is replaced with replaceVariableByHTML. I don't know, how many pages has the generated document. But I need on each page on the top a QR-code with (Page 1/12, Page 2/12 etc). The page number should stand In the footer of the generated document.

 

$docx = new \CreateDocxFromTemplate($filename);

$docx->replaceVariableByHTML(
        'body',
        'block',
        $html,
        array(
            'isFile' => false,
            'parseDivsAsPs' => true,
            'downloadImages' => false,
            'useHTMLExtended' => true,
        )
);

$docx = new \CreateDocxFromTemplate($tempDocxFileName);