Send pdf to printer driver

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • asedt
    New Member
    • Jun 2008
    • 130

    Send pdf to printer driver

    Hi

    I want to send pdf-files to a printer drive.

    I'm using vb 2005 making a Windows Forms application.
  • kataria
    New Member
    • Jun 2008
    • 6

    #2
    For this 1st you have to open pdf with acrobat dll.

    make the object of like:-

    gApp = CreateObject("A croExch.App")
    gAVDoc = CreateObject("A croExch.AVDoc")

    2. get the file path.

    3. use print method for printing the file.

    Comment

    • asedt
      New Member
      • Jun 2008
      • 130

      #3
      I have looked into trying to solve it in some diferent ways.

      I have tryed with this:

      Code:
      Dim PathToAcroRd32 As String = "C:\Program Files\Adobe\Reader 8.0\Reader\AcroRd32.exe"
      Dim PathToPDF As String = "C:\folder\sample.pdf"
      Dim PrinterDriver As String = "PrinterName"
      
      Call Shell(PathToAcroRd32 + " /t """ + PathToPDF + """ " + PrinterDriver)
      se: http://support.adobe.c om/devsup/devsup.nsf/docs/51412.htm

      It kinda works exept i cant hide it, the pdf is opened in the pdf reader and the pdf reader stays open :(

      Will try som other stuff now

      Comment

      • asedt
        New Member
        • Jun 2008
        • 130

        #4
        Got it working befor but not as good as I want it to work, I have problem with that the Shell runs asynchronously.

        Need to do something like this:
        http://www.computing.n et/answers/programming/waiting-after-shell-in-vb/12880.html

        Hmm I hope i get it working but any help wold be good.

        Comment

        Working...