I've successfully generated a .docx file using the OpenTBS plugin and a Word template, but when I try using the OPENTBS_ADDFILE, the Word file that downloads is corrupt. Is there something wrong with the code I'm using or maybe I'm misunderstanding what the add file function is for? Here's the line of code:
$TBS->Plugin(OPENTBS_ADDFILE, "secondpage.docx", "secondpage.docx", $DataType=TBSZIP_FILE, $Compress=false); |
I've tried $Name, $Data, and $Compress several different ways but nothing seems to work.
Thanks!