今天下载试用 Aspose.word 22.10 for java, 按照 比较 Java 中的 PDF (aspose.com) 中提供的示例代码执行时出错。
import com.aspose.words.*;
Document docA = new Document(“Input1.pdf”);
Document docB = new Document(“Input2.pdf”);// 比较前不应该有任何修改。
docA.acceptAllRevisions();
docB.acceptAllRevisions();docA.compare(docB, “Author Name”, new Date());
docA.save(“Output.pdf”);
错误信息如下:
Pdf format is not supported on this platform. Use .NET Standard or .NET 4.6.1 version of Aspose.Words for loading Pdf documents.
at com.aspose.words.zzZbj.zzYuP(Unknown Source)
at com.aspose.words.Document.zzWWH(Unknown Source)
at com.aspose.words.Document.zzWwL(Unknown Source)
at com.aspose.words.Document.(Unknown Source)
at com.aspose.words.Document.(Unknown Source)
比较docx 文件是正常的。