I have placed an ActiveX PDF control (the Adobe Reader OCX) on a .Net Windows form and set the .src property to the location of a PDF file on the internet. The control displays this file just fine when the application is run.
However, when I add a button to change the src file (to be displayed) with a
single line of code in the button click event as shown below:
AxPdf1.src = "http://www.somewebsite.com/somefile.pdf"
....I get the following error:
AccessViolationException was unhandled:
Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Does anyone have any idea what the problem is here
Also, I want to be able to print the PDF file programatically without any user intervention. If I use the .print method it brings up the print dialog box & the user has to click OK. That's not what I want. I tried all the other print methods that are available, including .printall, but none of them do anything.
I have AdobeReader 6.0 installed & I am using VB2005 Express.
Thanks for any help...
However, when I add a button to change the src file (to be displayed) with a
single line of code in the button click event as shown below:
AxPdf1.src = "http://www.somewebsite.com/somefile.pdf"
....I get the following error:
AccessViolationException was unhandled:
Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Does anyone have any idea what the problem is here
Also, I want to be able to print the PDF file programatically without any user intervention. If I use the .print method it brings up the print dialog box & the user has to click OK. That's not what I want. I tried all the other print methods that are available, including .printall, but none of them do anything.
I have AdobeReader 6.0 installed & I am using VB2005 Express.
Thanks for any help...

Using Adobe ActiveX control
DonMartin
Kapoulkine Arseny
In case you haven't found it yet, the interface is documented here. It doesn't quite match the freeware ActiveX version but you'll have something to work with...
rocky_don
With that version, the printAll() method doesn't generate the dialog, printWithDialog() does.
Glyn Darkin
Sundararajan
karthik asok
RookieDBA
SemiTransparent
rKarthik