- Code: Select all
InputStream stream = this.getClass().getResourceAsStream("test.docx");
WordprocessingMLPackage a = WordprocessingMLPackage.load(stream);
Unfortunately, this gives me the following exception:
- Code: Select all
org.docx4j.openpackaging.exceptions.Docx4JException: Error processing zip file (is it a zip file?)
If is use a FileInputStream loading the same file from a normal file path instead everything works fine.
- Code: Select all
FileInputStream fStream = new FileInputStream("C:\\test.docx");
WordprocessingMLPackage a = WordprocessingMLPackage.load(fStream);
Thus, it ...