Using VB6 to print a PDF with Acrobat 9

Ask a Question related to Adobe Acrobat SDK, Design and Development.

  1. #1

    Default Using VB6 to print a PDF with Acrobat 9

    I have an app that allows users to select multiple files and print
    them regardless if they are Word, Excel, PowerPoint, or PDF files. I
    had it working on my computer, but I had Acrobat 7. The rest of the
    staff has Acrobat 9 and when the print, nothing happens.

    So I installed Acrobat 9 and now nothing happens for me either. In
    VB6, the reference I use is Adobe Acrobat 9.0 Type Library. The code
    is as follows:

    Public Sub AcrobatPrint(Filename As String)

    Dim AcroExchApp As Acrobat.CAcroApp
    Dim AcroExchAVDoc As Acrobat.CAcroAVDoc
    Dim AcroExchPDDoc As Acrobat.CAcroPDDoc
    Dim num As Integer

    Set AcroExchApp = CreateObject("AcroExch.App")
    Set AcroExchAVDoc = CreateObject("AcroExch.AVDoc")

    ' Open the [strfiley] pdf file
    AcroExchAVDoc.Open Filename, ""

    ' Get the PDDoc associated with the open AVDoc
    Set AcroExchPDDoc = AcroExchAVDoc.GetPDDoc

    ' Get the number of pages for this pdf [and subtract one as zero
    based]
    num = AcroExchPDDoc.GetNumPages - 1
    Call AcroExchAVDoc.PrintPages(0, num, 1, True, True)

    'AcroExchApp.Show 'activate this line if you want to see the acrobat
    file
    AcroExchApp.Exit
    AcroExchAVDoc.Close (True)
    AcroExchPDDoc.Close


    End Sub


    It opens the file and gets the page count, but the print command is
    pretty much ignored. Any ideas?
    McKilty Guest

  2. Similar Questions and Discussions

    1. Acrobat Pro 8.1.12 and Acrobat Reader 9.0crashing when trying to print
      The subject line says it all, but I upgraded my MacBook Pro to Leopard 10.5.5 and now when I select File | Print I get the spinning beach ball than...
    2. Can't print a PDF in Acrobat 7 over 400%
      Hi, I need to print pdf's sometimes more than 400% of it's original size. They are for bus shelters etc... In the past, I just went to page set...
    3. Unable to print from Acrobat since Acrobat Reader update 7.02
      Since I have installed the Adobe Reader 7.02 update. I cannot print from Reader 7 or Acrobat Pro 6 but still can print from Reader 6. Error...
    4. Acrobat will not print - HELP
      check all the options in your print dialog very carefully. We had no printing on one work station. Turns out it had defaulted to In-RIP separations,...
    5. Acrobat toolbar buttons versus acrobat print driver?
      Is there any benefit to be gained by using the Acrobat buttons in the IE or Word toolbar as compared to generating the pdf by using the print driver?...
  3. #2

    Default Re: Using VB6 to print a PDF with Acrobat 9

    On Sep 16, 3:51*pm, McKilty <com> wrote: 

    Hmmm.... Nothing, huh? I'll try in a VB forum I suppose.
    McKilty Guest

  4. #3

    Default Re: Using VB6 to print a PDF with Acrobat 9

    Do I get a prize for stumping the Acrobat experts?
    McKilty Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139