Aspose.Pdf for android,save pdf to word,ArgumentException?

error message:class com.aspose.pdf.internal.ms.System.ArgumentException: Save a document to a doc format is not supported
image.png (2.4 KB)

val license = License()
license.setLicense(assets.open(“Aspose.Pdf.lic”))

val inputPath = Environment.getExternalStorageDirectory().absolutePath + “/HelloWorld.pdf”
val outputPath = Environment.getExternalStorageDirectory().absolutePath + “/HelloWorld2.docx”
val outFile = File(outputPath)
if (!outFile.exists()){ outFile.createNewFile() }

val doc = Document(inputPath)
val saveOptions = DocSaveOptions()
saveOptions.mode = DocSaveOptions.RecognitionMode.Flow
saveOptions.format = DocSaveOptions.DocFormat.DocX
doc.save(outputPath, saveOptions)

08.21申请的临时license;使用的版本是19.3

implementation (group: ‘com.aspose’, name: ‘aspose-pdf’, version: ‘19.3’, classifier: ‘android.via.java’)

似乎源码中对docx是不支持的?
image.png (5.8 KB)

@zjgzyc

感谢您与支持人员联系。

您是否可以详细说明您的许可证是否仍然有效或者是否已于2019年8月21日到期? 如果它已过期,您可以在Purchase Forum申请另一个。

如果它有效,那么请使用Document.isLicensed() 方法对其进行验证,并提及此问题是否仍然存在。我们希望它不会出现在有效许可证中。

image.png (62.1 KB)
license是有效的

@zjgzyc

我们正在检查它,并会尽快与您分享我们的反馈意见。

@zjgzyc

我们尝试使用下面的代码片段,但无法在我们的环境中重现它。 请分享您的样本文档以供我们参考。

Document doc = new Document(getExternalFilesDir("sample.pdf").toString());
DocSaveOptions saveOptions = new DocSaveOptions();
saveOptions.setFormat(SaveFormat.DocX);
doc.save(getExternalFilesDir("sample.docx").toString());

@zjgzyc

我们进行了进一步调查,并设法重现该问题。 它已作为PDFANDROID-565登录到我们的问题管理系统中,以进行调查和解决。