vivek padelkar vivek padelkar - 3 months ago 27
Vb.net Question

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?

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

Answer

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()
Comments