Closed Eskapone36 closed 1 year ago
You are inserting HTML contents in DOCX which is XML under the OpenXML format. This is not supposed to work.
Hi, thanks for your answer but inserting HTML is not what I'm doing there. The HTML data you see in my snippet are merely debug prints to see the file contents before and after the replacement takes place. What I am trying to replace is the content of 'block1.pics' with 'test.png'.
Hi, You're right, I can reproduce the bug. I'm working on it...
The bug is fixed in the new release OpenTBS version 1.11.2. It was a complicated bug, thank you for your patience.
Hi, I am having trouble exchanging images using the MergeBlock() function. Maybe I am not using it correct or I'm missing something, not exactly sure, please see my example below.
template.docx: template.docx test.png:
Used versions: php: 8.1.8 opentbs: 1.10.7
When comparing the BlockSource before and after the MergeBlock() call, you can see that tbs does not replace correct and corrupts the file contents.
Any help or conclusion is well appreciated, thanks in advance.
(works just fine with php 7.2 & opentbs 1.9.4)