Re: Print 1st page of PDF
If you have the Acrobat Reader then you could use the Acrobat Control for ActiveX. Put it on a Form and then call the LoadFile method followed by the PrintPages method.
Re: Print 1st page of PDF
From some Google searches I've found that, Adobe doesn't support/approve using Acrobat Reader OCX in our projects. :(
It is there only to display pdf in IE.
Make sure it is leagal, if it is a commercial project or you want to distribute your project (even for free).
Re: Print 1st page of PDF
Try PDFCreator. It is programmable for saving files. It might be good at printing files as well.
Re: Print 1st page of PDF
Quote:
Originally Posted by iPrank
From some Google searches I've found that, Adobe doesn't support/approve using Acrobat Reader OCX in our projects. :(
It is there only to display pdf in IE.
That was the most stupid thing I ever heard. In that case it would be legal to display it using the webbrowser control.
Re: Print 1st page of PDF
Yep. That would be legal, but we'll need extra work.
Anyway, I found some needed info in PowerBasic forum. But for some reason the original poster has deleted all his threads on January 7th. Here is the Google cache:
http://72.14.203.104/search?q=cache:...n&ct=clnk&cd=1
In that page he said,
Quote:
Originally Posted by Chuck Hicks of PowerBasic Forum
;)
Re: Print 1st page of PDF
Something like this should work:
VB Code:
Private Sub Command1_Click()
AcroPDF1.LoadFile "C:\MyPDFFile.pdf" 'Load a file
AcroPDF1.printPages 1, 1 'Print first page
End Sub
Re: Print 1st page of PDF
Quote:
Originally Posted by iPrank
Something like this should work:
VB Code:
Private Sub Command1_Click()
AcroPDF1.LoadFile "C:\MyPDFFile.pdf" 'Load a file
AcroPDF1.printPages 1, 1 'Print first page
End Sub
Which is exactly what I suggested in my origional post :)
Re: Print 1st page of PDF
Yes. That was your idea. :)
Anyway, johnweidauer has sloved his problem in other way. But I have found the new lincensing info when searching for him. Thanks to both of you. :thumb: