Forum


Replies: 10   Views: 4047
Createdocx gives a corrupted 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 admin  · 15-09-2017 - 17:15

Hello,

We have checked your DOCX. The problem is that Symfony is returning errors from your code:
 

<!DOCTYPE h
00006a68:  746d 6c3e 0a3c 6874 6d6c 3e0a 2020 2020 3c68 6561 643e 0a20  :tml>.<html>.    <head>.
00006a80:Â  2020 2020 2020 203c 6d65 7461 2063 6861 7273 6574 3d22 5554Â  :Â Â Â Â Â Â  <meta charset="UT
00006a98:  462d 3822 202f 3e0a 2020 2020 2020 2020 3c6d 6574 6120 6e61  :F-8" />.        <meta na
00006ab0:Â  6d65 3d22 726f 626f 7473 2220 636f 6e74 656e 743d 226e 6f69Â  :me="robots" content="noi
00006ac8:  6e64 6578 2c6e 6f66 6f6c 6c6f 7722 202f 3e0a 2020 2020 2020  :ndex,nofollow" />.     
00006ae0:Â  2020 3c6d 6574 6120 6e61 6d65 3d22 7669 6577 706f 7274 2220Â  :Â  <meta name="viewport"
00006af8:Â  636f 6e74 656e 743d 2277 6964 7468 3d64 6576 6963 652d 7769Â  :content="width=device-wi
00006b10:  6474 682c 696e 6974 6961 6c2d 7363 616c 653d 3122 202f 3e0a  :dth,initial-scale=1" />.
00006b28:Â  2020 2020 2020 2020 3c74 6974 6c65 3e20 2020 2054 6865 2063Â  :Â Â Â Â Â Â Â  <title>Â Â Â  The c
00006b40:Â  6f6e 7472 6f6c 6c65 7220 6d75 7374 2072 6574 7572 6e20 6120Â  :ontroller must return a
00006b58:Â  7265 7370 6f6e 7365 2028 6e75 6c6c 2067 6976 656e 292e 2044Â  :response (null given). D
00006b70:Â  6964 2079 6f75 2066 6f72 6765 7420 746f 2061 6464 2061 2072Â  :id you forget to add a r
00006b88:Â  6574 7572 6e20 7374 6174 656d 656e 7420 736f 6d65 7768 6572Â  :eturn statement somewher
00006ba0:Â  6520 696e 2079 6f75 7220 636f 6e74 726f 6c6c 6572 3f20 2835Â  :e in your controller? (5
00006bb8:Â  3030 2049 6e74 6572 6e61 6c20 5365 7276 6572 2045 7272 6f72Â  :00 Internal Server Error
00006bd0:  290a 3c2f 7469 746c 653e 0a20 2020 2020 2020 203c 6c69 6e6b  :).</title>.        <link


If you open the DOCX with a HEX viewer you can see the whole content of the errors.

If you run phpdocx standalone you can check everything is generated fine and DOCX is not corrupted. We recommend you to check your server and Symfony logs the find the source of that error messages (seems something wrong with a Controller).

Regards.