RSS feed
<< Is the Notes/Domino platform getting too complex? | Home | LocationDocument LotusScript class updated >>

Print from Adobe Acrobat using OLE

Just to have it somewhere... The code is from Visual Basic 6 with reference to the Acrobat TLD.

Private Sub Command1_Click()
    Dim doc As New AcroAVDoc
    If doc.Open("c:\test.pdf", "PDF Print") Then
        Dim numPages As Long
        numPages = doc.GetPDDoc().GetNumPages
        Debug.Print "Document has " & numPages & " page(s)..."
        If doc.PrintPagesSilent(0, numPages - 1, 0, True, True) Then
            Debug.Print "Printed document..."
        End If
    Else
        MsgBox "failed to open document"
    End If
    
    If Not (doc Is Nothing) Then
        Call doc.Close(True)
    End If
End Sub

Tags :


Re: Print from Adobe Acrobat using OLE

Does that work with the reader too?
I recall somewhere in the docu was "OLE automation is for the full version only".

Re: Print from Adobe Acrobat using OLE

Full version only I'm afraid but I did find a wrapper on the web that used DDE calls to do it with the Reader as well. Can't recall the link though.

Add a comment Send a TrackBack