Aspose.word.java 不支持某些docx格式的文件

我实例化 Document 时, 某些docx文件并不支持
代码如下:
Document doc = new Document(“C:\Users\Administrator\Desktop\视频\20191101162813475.docx”);
报错如下:
com.aspose.words.FileCorruptedException: The document appears to be corrupted and cannot be loaded.
at com.aspose.words.FileFormatUtil.zzZ(Unknown Source)
at com.aspose.words.Document.zzY(Unknown Source)
at com.aspose.words.Document.zzZ(Unknown Source)
at com.aspose.words.Document.(Unknown Source)
at com.aspose.words.Document.(Unknown Source)

可以帮帮我吗,这个问题怎么解决?
网上说替换动态链接库即可解决
但是 这并不能解决 Aspose.word.for.java版本的

@her157aa,

您是否尝试过最新版的Java Java版Aspose.Words,即19.10? 如果问题仍然存在,请ZIP并上传您的输入Word文档,您将在此处遇到此问题进行测试。 然后,我们将对此进行调查,并为您提供更多信息。

下载链接: Aspose.Words | Java Library to Process Document Formats

你好,我已经测试过最新版的 Aspose.word for java 19.10版本
但它还是会出现该问题,
附件中包含20191101162813475.zip (2.1 MB)
测试的DOCX文件

@her157aa,

我们测试了这种情况,并最终设法重现了同样的问题。 为了更正,我们已将此问题记录在问题跟踪系统中。 此问题的ID为WORDSNET-19502。 我们将进一步调查该问题的详细信息,并让您及时了解更正的状态。 对于给您带来的不便,我们深表歉意。

My client is giving me feedback on this,

But I can’t solve it alone!

If the time is too long, I will lose customers!

Please reply me as soon as possible ~ this is very important to me!

Please!

Please!

Thank you very much.

@her157aa,

We have good news for you i.e. WORDSNET-19502 has now been resolved. The fix of this issue will be included in the 19.12 (next version) of Aspose.Words for Java. We will inform you via this thread as soon as the next version containing the fix of your issue will be released at the start of next month.

Okay, that’s a big help

Thank!

I love you

Hello,

The latest version of Aspose

Can it be released as soon as possible?

My client can’t wait

If we wait until the beginning of next month,

He’ll run away

My company will lose a lot of money

Can it be released as soon as possible?

thanks very much!!

please

@her157aa,

We have discussed the matter internally and are very hopeful to prepare an interim-build (hotfix) JAR of ‘Aspose.Words for Java’ for you containing the fix of WORDSNET-19502 within next couple of days. We will keep you posted on any further updates and let you know when this JAR will be available in next couple of days.

@her157aa,

It is to update you that we have implemented a fix for your issue (WORDSNET-19502). The fix of this issue will officially be included in the next Aspose.Words for Java 19.12 release. We will inform you via this thread as soon as next release containing the fix of your issue will be publicly available at the start of next month.

However, in the meantime you can use the following JAR to verify the fix on your end:

This version is compared with the 19.10 version

Only fixed the problem (wordsnet-19502)

The rest of the code or methods didn’t change.

Is that it?

@her157aa,

This JAR was built on top of Aspose.Words for Java 19.11 which means it includes all features of Aspose.Words for Java 19.11 and additionally the fix of WORDSNET-19502. Hope, this helps.

Got it
thanks very much!

Hi,

I’ve tested it with your published jar.

Although it can achieve:

Document d = new Document(“C:\Users\Administrator\Desktop\20191101162813475.docx”)

However, there are some blanks in generating PDF files (the appearance of word documents and PDF files are different):

d.save(“C:\Users\Administrator\Desktop\errDocx.pdf”, SaveFormat.PDF);

My client is a jerk, jerk, bitch

He won’t stand this bug

Can you help me as soon as possible?

It’s very important to me

@her157aa,

We have converted your “20191101162813475.docx” to PDF by using the new .jar and attached it here for your reference. I am afraid, we do not see any blank areas in this PDF. Please make sure that you have installed the required fonts on your machine where you are performing Word to PDF conversion.

A post was split to a new topic: Get 30-day Temporary License of Aspose.Words for Java

The issues you have found earlier (filed as WORDSNET-19502) have been fixed in this Aspose.Words for .NET 19.12 update and this Aspose.Words for Java 19.12 update.

2 posts were split to a new topic: Avoid File Corrupted Exception upon Loading a Word DOCX | Java