Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Acrobat and auto printing

Status
Not open for further replies.

Taxidriver

Programmer
Jan 15, 2002
79
IT
Is it possible to have Acrobat working with another application and have Acrobat communicate that there's a new document to be printed; the application automatically commands the printing so that the user hasn't to do that.
How can Acrobat communicate?
 
I'm reading the sdk documentation and I understand that it is possible to write an OLE application that can open a pdf file and print it 'silently' without displaying the dialog box. But suppose that a pdf file is just been generated, how can acrobat signal it and start printing the file without displaying the dialog box?
 
I don't know exactly, there must be a custom application that generates them.
 
I read that there's this AVAppRegisterNotification that should be able to notify an event. So it could be possible to generate a pdf and notify it to the application so that it can silently print it.
Is it too complicated? what do you think?
By the way I have tested this code:
Private Sub Form_Load()
Dim a As CAcroAVDoc
Dim p As CAcroPDDoc
Dim i As Integer

Set p = CreateObject("AcroExch.PDDoc")
p.Open "C:/adobe.pdf"

Set a = p.OpenAVDoc(p.GetFileName)

i = p.GetNumPages
a.PrintPages 0, i, 0, 0, 0
a.Close 0 'close with same name as when opened
p.Close

End Sub

it opens the document but does not print it and cannot understand why.
 
If you don't know how the PDF is created, then how can you expect Acrobat to know? I'm missing something. You are expecting PDF creation to generate an event, somehow, somewhere. That's where you need to start. That application may have its own API, for example.



Thomas D. Greer

Providing PostScript & PDF
Training, Development & Consulting
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top