Categories > OpenTBS with DOCX >

Errormessage by WORD, when opening document

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Horst Günther
Date: 2015-11-05
Time: 13:59

Errormessage by WORD, when opening document

Hallo,

I have a problem with opentbs and Word:
When I open the document, I get an error-message:

It says, that the file is corrupted. After OK, I get the file and all seems to be OK.

And it occurs only under php 5.4. On another server with php 5.3 it runs fine.

I use the newest version of opentbs.

Many thanks for help.

Horst Günther

By: Skrol29
Date: 2015-11-05
Time: 23:15

Re: Errormessage by WORD, when opening document

Hi,

Maybe some unexpected content is send by your script. Sucha a debugging echo() or a closing PHP tag (« ?> ») with a space or a new line after it.
You can try the debugging command $TBS->PlugIn(OPENTBS_DEBUG_XML_SHOW)
or you can check the binary contents of the merged DOCX.
By: Horst Günther
Date: 2015-11-06
Time: 21:30

Re: Errormessage by WORD, when opening document

Hi,

many Thanks. The Debug-Mode solved it: It was a blank after ?>.

Horst Günther

By: amedeo
Date: 2016-07-09
Time: 10:43

Re: Errormessage by WORD, when opening document

I had such trouble of corrupted DOCX documents; although in my case the reason was very different. I had to produce the same document both in PDF, DOCX and ODT; my fault was in using ODT template when outputting to DOCX: i was able to open the resulting DOCX with LibreOffice but M$Word could not. Switching to DOCX template solved the problem.