Error with some old Word documents


#1

We are evaluating Aspose total for rendering files to PDF. With some old Word documents we get an Exception:

Code used:
Document doc = new Document(source);

			PdfSaveOptions pso = new PdfSaveOptions();
			pso.setCompliance(PdfCompliance.PDF_15);
			doc.save(target, pso);

Exception thrown in line
Document doc = new Document(source);:

: com.aspose.words.FileCorruptedException: The document appears to be corrupted and cannot be loaded.
	at com.aspose.words.FileFormatUtil.zzZ(null:233)
	at com.aspose.words.Document.zzY(null:1708)
	at com.aspose.words.Document.zzZ(null:1631)
	at com.aspose.words.Document.<init>(null:185)
	at com.aspose.words.Document.<init>(null:127)
	...
Caused by:
	: java.io.EOFException: End of file reached.
		at com.aspose.words.internal.zz6U.zzSr(null:206)
		at com.aspose.words.internal.zz6U.zzY7(null:93)
		at com.aspose.words.internal.zz6U.zzY6(null:108)
		at com.aspose.words.zzW.<init>(null:29)
		at com.aspose.words.zzYTR.zzYGY(null:91)
		at com.aspose.words.zzYTR.zzZ(null:47)
		at com.aspose.words.zz9I.read(null:134)
		at com.aspose.words.zz9Q.read(null:41)
		at com.aspose.words.Document.zzY(null:1687)
		at com.aspose.words.Document.zzZ(null:1631)
		at com.aspose.words.Document.<init>(null:185)
		at com.aspose.words.Document.<init>(null:127)

Any idea, what is happening there?
Thanks in advance.


#2

@BOO_Technologies

Could you please attach your input Word document here for testing? We will investigate the issue on our side and provide you more information.


#3

@tahir.manzoor
Thanks for the fast reply.
I attached two of the problem .doc files here.
docsWithProblem.zip (266.7 KB)


#4

@BOO_Technologies

We have tested the scenario and have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system. The issue IDs for both documents are WORDSNET-18727 and WORDSNET-18728. You will be notified via this forum thread once these issues are resolved.

We apologize for your inconvenience.