Hello community,
I was looking for a tool that allows converting given WordML documents to RTF and TXT files. Aspose seemed to do the job perfectly. However, after further investigation it turned out that the Word documents I am converting do not contain any text or images. Indeed, the text file is completely empty (it only has spaces/blanks in it), while the RTF file contains image place holders (I think) and also no text.
I have attached one of these original reports to this post for reproduction. The code I am using is as following:
Dim wordDocument As New Document(strSourceFile)
wordDocument.Save(targetFileNameTXT, SaveFormat.Text)
wordDocument.Save(targetFileNameRTF, SaveFormat.Rtf)
Executing the following code shows me that Aspose has detected the right file format (LoadFormat = WordML {31}):
Dim info As FileFormatInfo = FileFormatUtil.DetectFileFormat(strSourceFile)
But the following code gives me a complete weird content of the file:
Dim test as String = wordDocument.GetText()
Result: "aaa□□□□PAGE□□□□□aaNUMPAGESaaaaaaa□□□□□□□□□□□ {…}"
Could anyone please assist in detecting and solving the problem?
Thank you and best regards,
BIOS