New Forum | Previous | Next | (P-PDF) Developers
Topic: Question about OLE
Conf: (P-PDF) Developers, Msg: 56115
Date: 5/29/2002 05:17 PM
the method AVDoc.PrintPages doesn't print
see code below:
I am using the OLE methods to print a pdf. I am able to get a handle on the document, open it in Acrobat and give the print commands. The document shows up in the printer window(it's a network printer) but nothing actually prints out. Any ideas why it shows up as if it's going to print but never prints? No errors or anything.
Sub PrintPDF( strFileName as string )
Set AcroApp = CreateObject("AcroExch.App")
If AcroApp.Show = False Then
Msgbox "Cannot start Acrobat"
Set AVDoc = CreateObject("AcroExch.AVDoc")
AVDoc.Open strFileName, ""
Set PDDoc = AVDoc.GetPDDoc
iNumPages = PDDoc.GetNumPages
AVDoc.PrintPages 0, iNumPages - 1, 2, True, True
Set AVDoc = Nothing
Set PDDoc = Nothing