Open guiramadasa opened 9 years ago
When checked files with is_readable(), it is readable, but get above error.
As I know you can only use .docx format for temaplate files.
Hi, did you find a solution, I try to read the file from an file abstraction layer which returns sadly doesn't work at all, now I tried to create a temporary file for processing, but still doesn't work:( Thanks
Has anyone made .DOC file work on templateprocessor?
Still didn't find a solution for .doc
format.
I'm facing the same issue. I have a DOC file. It is readable as well. I got Invalid or uninitialized Zip object
error.
I tried to loading format change as well with MsDoc. but still not woking. Can you please support to here :) Thanks!!!
This happended to me, the problem was due to the line endings in the doc file. My server runs on linux, my doc file was saved with LF line ending, but pulling the repo changed the line endings to CRLF.
I solved it by specifying in .gitattributes
that the doc(x) files where to be considered as binary.
*.doc binary
*.docx binary
The problem disappeared.
You can check the line endings of your file using
cat -e yourfile
If lines end with M$ you have CRLF line endings.
Hi,
I am trying to replace some content in a word file, using following code.
But it gives following errrors.
Warning: ZipArchive::getFromName(): Invalid or unitialized Zip object in /home2/xxx/public_html/xxx/FL/xxx/sc/includes/PhpWord/Shared/ZipArchive.php on line 198
Warning: ZipArchive::getFromName(): Invalid or unitialized Zip object in /home2/xxx/public_html/xxx/FL/xxx/sc/includes/PhpWord/Shared/ZipArchive.php on line 201
The file path is correct and also the solution needs to support both .doc and .docx formats.
It will be a great help if you can support me on this.
Thank you.