Print pdf document from vb .net application

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Sameer Parekh

    Print pdf document from vb .net application

    Hello everyone,

    We are automating a paper based process and hence need to print certain
    pdf documents through our VB .Net Application. Any ideas how that can be
    done?

    Thanks



    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
  • Herfried K. Wagner [MVP]

    #2
    Re: Print pdf document from vb .net application

    "Sameer Parekh" <parekhs@myheal thchoice.com> schrieb:[color=blue]
    > We are automating a paper based process and hence need to print certain
    > pdf documents through our VB .Net Application.[/color]

    Simple solution (this solution doesn't give you much control about
    printing):

    Printing files of various types without user interaction
    <URL:http://dotnet.mvps.org/dotnet/faqs/?id=printingany file&lang=en>

    In addition to that, you may want to take a closer look at Adobe Acrobat,
    Adobe Reader and the PDF library:

    Adobe PDF Library SDK
    <URL:http://partners.adobe. com/public/developer/pdf/library/>

    --
    M S Herfried K. Wagner
    M V P <URL:http://dotnet.mvps.org/>
    V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

    Comment

    • Sameer Parekh

      #3
      Re: Print pdf document from vb .net application

      I tried running this with a series of documents and it only prints out
      the first one. It runs through the code, but does not print out
      subsequent documents.
      Any ideas?
      Thanks



      *** Sent via Developersdex http://www.developersdex.com ***
      Don't just participate in USENET...get rewarded for it!

      Comment

      • Herfried K. Wagner [MVP]

        #4
        Re: Print pdf document from vb .net application

        "Sameer Parekh" <parekhs@myheal thchoice.com> schrieb:[color=blue]
        >I tried running this with a series of documents and it only prints out
        > the first one. It runs through the code, but does not print out
        > subsequent documents.
        > Any ideas?[/color]


        You can try to wait until the first document has been sent to the printer
        (untested!):

        \\\
        Dim p As Process = Process.Start(. ..)
        p.WaitForExit()

        ' Print next document...
        ///

        --
        M S Herfried K. Wagner
        M V P <URL:http://dotnet.mvps.org/>
        V B <URL:http://classicvb.org/petition/>

        Comment

        • Sameer Parekh

          #5
          Re: Print pdf document from vb .net application

          Well, I did try the same yesterday, but when there are 2 pdf documents,
          it prints the first one and then the program just seems to be waiting.
          At that point the adobe application is running, and if I close it out,
          then it prints the subsequent document. Any ideas?
          Thanks



          *** Sent via Developersdex http://www.developersdex.com ***
          Don't just participate in USENET...get rewarded for it!

          Comment

          • Rob Nicholson

            #6
            Re: Print pdf document from vb .net application

            > We are automating a paper based process and hence need to print certain[color=blue]
            > pdf documents through our VB .Net Application. Any ideas how that can be
            > done?[/color]

            Not much help but I can say that we found printing PDF documents in our
            previous VB6 application to be a real problem. Whilst Acrobat does have an
            API, there were some glaring omissions like the inability to specify
            different paper trays for page 1 than for page 2 - a typical requirement in
            printing on letter head and continuation paper. In the end we had to try and
            battle with the Word API to print complex documents.

            I dare say there are solutions to this but they were a real overkill of our
            simple requirement.

            Good luck!

            Cheers, Rob.


            Comment

            Working...