Printing Acrobat Dynamically
Hi,
I have a web page, I press a print button from that web page,then a pdf(acrobat) file will get populated with field values from the database at the background and the generated acrobat should be printed. The generated acrobat should not be displayed to the user. I am able to populate the acrobat fields using FDF toolkit(using OLE automation) now I need to print this dynamically generated pdf file,Need to know how this printing can be achieved .
Thanks,
Surajit
Re: Printing Acrobat Dynamically
In your acrobat directory there should also be an "ActiveX" directory. In there is a PDF.OCX control. One of it's methods it "Print"....
Re: Printing Acrobat Dynamically
Hi,
Yeah there is a PDF.OCX control, can you
help me with some code samples as to what to
do,I am new to Activex ,
Thanks ,
Suraj
Re: Printing Acrobat Dynamically
After you've added a reference to the OCX, place one on your form. Add a command button and try this code:
private Sub Command1_Click()
'put whatever filename you want to print...
Pdf1.LoadFile ("C:\program files\adobe\acrobat 4.0\reader\readme.pdf")
Pdf1.printWithDialog
'or
'pdf1.print
'pdf1.printall
'or whatever options you wish...
End Sub
Re: Printing Acrobat Dynamically
Hi ,
Tried your code but could not set a reference
to pdf.ocx and what should I instantiate
through createobject method.
Like for word we have
Set mydoc = Createobject("Word.Application")
Pls let me know about this.
Thanks,
Suraj