Thread View: adobe.acrobat.sdk
3 messages
3 total messages
Started by McKilty
Wed, 16 Sep 2009 19:51
Using VB6 to print a PDF with Acrobat 9
Author: McKilty
Date: Wed, 16 Sep 2009 19:51
Date: Wed, 16 Sep 2009 19:51
42 lines
2499 bytes
2499 bytes
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?
Re: Using VB6 to print a PDF with Acrobat 9
Author: McKilty
Date: Thu, 17 Sep 2009 17:29
Date: Thu, 17 Sep 2009 17:29
43 lines
2858 bytes
2858 bytes
On Sep 16, 3:51 pm, McKilty <bluesbr...@gmail.com> wrote:
> 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?
Hmmm.... Nothing, huh? I'll try in a VB forum I suppose.
Re: Using VB6 to print a PDF with Acrobat 9
Author: McKilty
Date: Tue, 22 Sep 2009 12:57
Date: Tue, 22 Sep 2009 12:57
1 lines
1375 bytes
1375 bytes
Do I get a prize for stumping the Acrobat experts?
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads