Rtfファイルの読み込みができません

Aspose.Words for Java を利用しております。
特定のファイルでだけ下記のような事象が出ております。
ファイルを添付しましたので、原因を教えて頂きたくよろしくお願いします。

・現象
RTFファイルの読み込み時に例外が出て読み込めない事象が発生しています。
ファイルをMS-WORDで開いても問題なく表示されます。

・処理内容
protected Document read(Path file)
{
try (InputStream is = Files.newInputStream(file))
{
Document doc = new Document(is); ←ここでエラーになります

・例外(一部パッケージ名はマスクしています)
Caused by: com.aspose.words.FileCorruptedException: The document appears to be corrupted and cannot be loaded.
at com.aspose.words.FileFormatUtil.zzZ(Unknown Source)~[aspose-words-17.9-jdk16.jar:17.9]
at com.aspose.words.Document.zzY(Unknown Source) ~[aspose-words-17.9-jdk16.jar:17.9]
at com.aspose.words.Document.zzZ(Unknown Source) ~[aspose-words-17.9-jdk16.jar:17.9]
at com.aspose.words.Document.(Unknown Source) ~[aspose-words-17.9-jdk16.jar:17.9]
at com.aspose.words.Document.(Unknown Source) ~[aspose-words-17.9-jdk16.jar:17.9]
at com.aspose.words.Document.(Unknown Source)~[aspose-words-17.9-jdk16.jar:17.9]
at xx.xx.xx.xx.xx.xx.xx.xx.MyClass.read(MyClass.java:800) ~[classes/:na]
… 45 common frames omitted
Caused by: java.lang.IllegalStateException: Requested default value for an unknown attribute.
at com.aspose.words.zz5.zzTT(Unknown Source) ~[aspose-words-17.9-jdk16.jar:17.9]
at com.aspose.words.zz5.zzV(Unknown Source) ~[aspose-words-17.9-jdk16.jar:17.9]
at com.aspose.words.zzZ32.zzZqK(Unknown Source) ~[aspose-words-17.9-jdk16.jar:17.9]
at com.aspose.words.zzZ25.zzX(Unknown Source) ~[aspose-words-17.9-jdk16.jar:17.9]
at com.aspose.words.zzZ49.zzU(Unknown Source) ~[aspose-words-17.9-jdk16.jar:17.9]
at com.aspose.words.zzZ3Y.zzU(Unknown Source) ~[aspose-words-17.9-jdk16.jar:17.9]
at com.aspose.words.zzZ2P.read(Unknown Source) ~[aspose-words-17.9-jdk16.jar:17.9]
at com.aspose.words.Document.zzY(Unknown Source) ~[aspose-words-17.9-jdk16.jar:17.9]
… 50 common frames omitted<a class=“attachment”

href="/uploads/default/20743">IMAGE_0016-1.zip (27.7 KB)

@taka34x,

シナリオをテストし、同じ問題を私たちの目的のために再現することができました。 訂正のために、私たちはこの問題を当社の問題追跡システムに記録しました。 この問題のIDはWORDSNET-17766です。 この問題の詳細をさらに詳しく調べ、修正のステータスを更新します。 ご迷惑をおかけして申し訳ありません。

1 Like

ご確認ありがとうございます。
修正よろしくお願いします。

お客様の業務阻害になっているため暫定でも良いので回避策を取りたいのですが、
ファイルのどこかの設定を変更することで正常に読み込めるようにならないでしょうか。

@taka34x,

あなたの要求に感謝します。 回避策や見積もり(時間枠)が利用可能になるとすぐに、このスレッドを通じて通知させていただきます。 ご不便をおかけして申し訳ございません。

1 Like

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

1 Like