Results 1 to 13 of 13

Thread: [RESOLVED] Printing PDF Files

Hybrid View

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Oct 2000
    Posts
    1,463

    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

  2. #2

    Thread Starter
    Frenzied Member
    Join Date
    Oct 2000
    Posts
    1,463

    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

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Oct 2000
    Posts
    1,463

    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
  •  



Click Here to Expand Forum to Full Width