I would like to use Visual Basic to search and extract text within a pdf file and print both the extracted text and main pdf file located in an external drive. (same folder).
Example: c:/files/hello.pdf
{code must find the} text string "hi" within hello.pdf
and print hello.pdf AND hi.pdf from c:/files/
I've been experimenting with streamreader in visual basic and so far I have not yet found help on a what I want to accomplish.
I'm willing to put hours and days of research and try learning how to code, but could someone please help me?
Here is what I have done so far to accomplish this task. the form1 interface just consist of 3 buttons, 1 textbox 1 listbox. Textbox(to enter parent), load(to load into list), findsub,(to find text sting within parent) print, listbox)(just a list box not needed.
my aim as of now is to have the user input the "parent".pdf in a text box
then have the code load the "parent.pdf" into listbox. from the C:\PDFfiles\
while in listbox (doesn't have to be) the code should search within parent.pdf and find a certain text string called "child" (child is also another pdf in the same folder)
and automatically load the "child.PDF" file and user clicks on print and it will print all the files listed in the listbox. (SEE ATTACHED FOR PICTURE)
Imports System.IO
Public Class MainForm
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLoadfile.Click
ListSubfound.Items.Add(Enterpart.Text)
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnFindSub.Click
End Sub
Private Sub Enterpart_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Enterpart.TextChanged
End Sub
Private Sub btnPrint_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPrint.Click
PrintDocument1.PrinterSettings.PrintToFile = True
PrintDocument1.PrinterSettings.PrintFileName = ("c:\hellow\stake.pdf")
PrintDocument1.Print()
End Sub
Private Sub ListSubfound_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListSubfound.SelectedIndexChanged
End Sub
End Class
Thanks,
Steve Jai Singh.
Example: c:/files/hello.pdf
{code must find the} text string "hi" within hello.pdf
and print hello.pdf AND hi.pdf from c:/files/
I've been experimenting with streamreader in visual basic and so far I have not yet found help on a what I want to accomplish.
I'm willing to put hours and days of research and try learning how to code, but could someone please help me?
Here is what I have done so far to accomplish this task. the form1 interface just consist of 3 buttons, 1 textbox 1 listbox. Textbox(to enter parent), load(to load into list), findsub,(to find text sting within parent) print, listbox)(just a list box not needed.
my aim as of now is to have the user input the "parent".pdf in a text box
then have the code load the "parent.pdf" into listbox. from the C:\PDFfiles\
while in listbox (doesn't have to be) the code should search within parent.pdf and find a certain text string called "child" (child is also another pdf in the same folder)
and automatically load the "child.PDF" file and user clicks on print and it will print all the files listed in the listbox. (SEE ATTACHED FOR PICTURE)
Imports System.IO
Public Class MainForm
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLoadfile.Click
ListSubfound.Items.Add(Enterpart.Text)
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnFindSub.Click
End Sub
Private Sub Enterpart_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Enterpart.TextChanged
End Sub
Private Sub btnPrint_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPrint.Click
PrintDocument1.PrinterSettings.PrintToFile = True
PrintDocument1.PrinterSettings.PrintFileName = ("c:\hellow\stake.pdf")
PrintDocument1.Print()
End Sub
Private Sub ListSubfound_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListSubfound.SelectedIndexChanged
End Sub
End Class
Thanks,
Steve Jai Singh.