|
-
Oct 12th, 2011, 11:00 AM
#1
Thread Starter
Frenzied Member
Re: Printing PDF Files
Hack, thanks for the reply! I just tried the code and on the ProcessStart line it gives an error that the system cannot find the specified file.
So I added the path in front of the filename and it works!!! Thank you!!!!
Warren
-
Oct 12th, 2011, 11:37 AM
#2
Thread Starter
Frenzied Member
Re: [RESOLVED] Printing PDF Files
It did work but now have an issue with it. I get the Adobe Reader X screen popup at times and when I close it, the print continues.
I did modify the code to use the files from a listbox. The files are listed without the extensions so you can see where I added the .pdf.
Code:
For X = 0 To ListBox2.Items.Count - 1
Dim V1 As String = ListBox2.Items(X).ToString & ".pdf"
lblFile.Text = V1
Dim strPDFFile As String = Dir("c:\pdffiles\*" & V1)
Dim PrintPDFFile As New ProcessStartInfo
Do Until strPDFFile Is Nothing
PrintPDFFile.UseShellExecute = True
PrintPDFFile.Verb = "print"
PrintPDFFile.WindowStyle = ProcessWindowStyle.Hidden
PrintPDFFile.FileName = "c:\pdffiles\" & strPDFFile
Process.Start(PrintPDFFile)
If btnYes.Checked = True Then
Dim A1 As String = ListBox2.Items(X).ToString
If File.Exists(WLPath) = True Then
Process.Start(WLPath, A1)
End If
End If
strPDFFile = Dir()
Loop
Next
-
Oct 14th, 2011, 09:34 AM
#3
Thread Starter
Frenzied Member
Re: [RESOLVED] Printing PDF Files
Does anyone know how to use this code and not have the Adobe Reader X screen show at times?
Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|