I have a pretty simple template in which I am switching out .png images. There is one in the document that is just transparent, and when the document merges, I use ope=changepic to switch in another image that is visible. My image Alt Text looks like:
[onshow.data.signer.signature;ope=changepic;tagpos=inside]
|
I have tried onload and onshow. When I take this tag out (so I'm not swapping pictures at all), the document merges perfectly. When I merge with a picture swap, I get a corrupt docx. Word does repair it successfully (and my swapped image is correct once it repairs), but doesn't give me any information about the source of the corruption. I can also repair the file manually by changing the extension to .zip and going into word/media and deleting the original .png (image1.png). Once this file is gone, Word no longer complains about the file being corrupt and the document looks perfect.
I updated to the newest OpenTBS and TBS but it did not help.
* Debug command: OPENTBS_DEBUG_XML_SHOW
* OpenTBS version: 1.9.4
* TinyButStrong version: 3.9.0
* PHP version: 5.5.9-1ubuntu4.6YES
* Opened document: templates/commercial-invoice.docx
* Activated features for document type: openxml/docx
* Deleted files in the archive: none
* Added files in the archive:
- word/media/opentbs_added_1.png
* Modified files in the archive:
- word/header1.xml
- word/header2.xml
- word/footer1.xml
- word/footer2.xml
- docProps/core.xml
- word/document.xml
- word/_rels/document.xml.rels
I've been beating my head on a wall trying to figure out why this simple template isn't working (and I could have sworn it was working for a while...), but I am not making progress. Any thoughts what could be causing it or how I can find out more about the problem? Should the original image1.png still be present in the archive after the merge or is it supposed to be deleting and my permissions are screwing something up?
As always, love OpenTBS.
Thanks for reading.