简体   繁体   English

如何将pdf转换为文本文件n vb.net

[英]how to convert pdf to text files n vb.net

please help mi guys,Im tryig to convert the pdf file into text using vb.net desktop application, I visited to many websites but they provide a trial version software there is any solution to to toubleshoot this issue? 请帮助我,我尝试使用vb.net桌面应用程序将pdf文件转换为文本,我访问了许多网站,但他们提供了试用版软件,有没有解决此问题的解决方案?

My page flow is like : 1) user select the .PDF file from filebrowser 2)then simply click on 'convert to text file' button 3)it will open respective .POF file from the path and convert it to the .TXT file and save it to the specific locaton 我的页面流程如下:1)用户从文件浏览器中选择.PDF文件2)然后只需单击“转换为文本文件”按钮3)它将从路径中打开相应的.POF文件,并将其转换为.TXT文件,将其保存到特定位置

by including this reference 通过包含此参考

pdfbox-1.8.9.dll
commons-logging.dll
fontbox-1.8.9.dll
IKVM.OpenJDK.Text.dll
IKVM.OpenJDK.Util.dll
IKVM.Runtime.dll
IKVM.OpenJDK.Core.dll
IKVM.OpenJDK.SwingAWT.dll

try this code 试试这个代码

Dim doc As PDDocument = Nothing
doc = PDDocument.load(input)
Dim stripper As New PDFTextStripper()
Dim textFormPdf =stripper.getText(doc)
doc.close()

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM