I am working on a school project that has several pdf files. There should be a search by name functionality that I just type in the student's name and all the pdf files with his/her name should open. What is the best way to do this? I've looked for solutions on the net and all I am coming up with is iTextSharp and it's making more confused.
Is this possible? Maybe someone can please give me a link to a tutorial, or something. :) Thank you very much.
Use iTextSharp. It's free and you only need the "itextsharp.dll".
http://sourceforge.net/projects/itextsharp/
Here is a simple function for reading the text out of a PDF.
Public Shared Function GetTextFromPDF(PdfFileName As String) As String
Dim oReader As New iTextSharp.text.pdf.PdfReader(PdfFileName)
Dim sOut = ""
For i = 1 To oReader.NumberOfPages
Dim its As New iTextSharp.text.pdf.parser.SimpleTextExtractionStrategy
sOut &= iTextSharp.text.pdf.parser.PdfTextExtractor.GetTextFromPage(oReader, i, its)
Next
Return sOut
End Function
Now you can search through those files with ease.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With