Convert PDF to Excel in Java [closed]

為{幸葍}努か 提交于 2019-12-25 18:48:24

问题


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.


回答1:


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);

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.

I work with Aspose as Developer Evangelist.



来源:https://stackoverflow.com/questions/49314190/convert-pdf-to-excel-in-java

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!