用Java将PDF转换为Excel [英] Convert PDF to Excel in Java

查看:1848
本文介绍了用Java将PDF转换为Excel的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用Java将PDF文件转换为Excel. 我们已经使用itext生成了PDF文件.现在我们要将其转换为excel. 我们希望示例代码将pdf转换为excel. 或建议API.

How to convert PDF file to Excel using Java. We have generate PDF file using itext. Now we want to convert it to excel. we want sample code to convert pdf to excel. or kindly Suggest API.

推荐答案

您可以使用以下代码段将PDF文档转换为带有Aspose.PDF API的Excel工作簿.请确保使用 Aspose.PDF用于您环境中的Java 18.2 .

You can convert a PDF document to an Excel workbook with Aspose.PDF API by using below code snippet. Please ensure using Aspose.PDF for Java 18.2 in your environment.

// Load PDF document
Document document = new Document("Test.pdf");
// Instantiate ExcelSave Option object
ExcelSaveOptions excelsave = new ExcelSaveOptions();
// Save the output to XLS format
document.save("ConvertedFile.xls", excelsave);

如果您发现生成的文件有任何问题,请通过将其上传到任何文件共享服务器(例如Google Drive,Dropbox等)与我们共享.还要共享您的环境详细信息(操作系统详细信息,JDK/JRE版本等)我们可以尝试重现此问题并进行调查,以为您提供帮助.

In case you notice any problem with generated file, please share it with us by uploading it to any file sharing server like Google Drive, Dropbox etc. Also share your environment details (OS details, JDK/JRE version etc) so that we can try to reproduce and investigate the issue to help you out.

我与Aspose一起担任开发人员推广人员.

I work with Aspose as Developer Evangelist.

这篇关于用Java将PDF转换为Excel的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆