Download PDF files from a website

H

Henry

I am trying to download some PDF files from a website.

I am using the IWebBrowser2::Navigate Method

m_WebBrowser.Navigate

to get to the site. This works ok and the requested PDF file is displayed in
the window.

Then I am trying to SAVE TO A DIRECTORY the downloaded PDF file that is
currently displayed.

I am using the IWebBrowser2::ExecWB Method

m_WebBrowser.ExecWB(OLECMDID_SAVE, 2, NULL, NULL);

This does not work as far as I can tell. Any ideas?

Henry
 
W

WaIIy

I am trying to download some PDF files from a website.

I am using the IWebBrowser2::Navigate Method

m_WebBrowser.Navigate

to get to the site. This works ok and the requested PDF file is displayed in
the window.

Then I am trying to SAVE TO A DIRECTORY the downloaded PDF file that is
currently displayed.

I am using the IWebBrowser2::ExecWB Method

m_WebBrowser.ExecWB(OLECMDID_SAVE, 2, NULL, NULL);

This does not work as far as I can tell. Any ideas?

Henry

Right click the link and select 'Save As' and maybe a window
will pop up and ask you where you should save it to.

Maybe
 
H

Henry

WaIIy said:
Right click the link and select 'Save As' and maybe a window
will pop up and ask you where you should save it to.

Maybe

I am currently using OLECMDEXECOPT_DONTPROMPTUSER in order to avoid any
keyboard intervention.

I am using m_WebBrowser.ExecWB(OLECMDID_SAVE, OLECMDEXECOPT_DONTPROMPTUSER,
NULL, NULL);

so that the PDF files will be stored, one after another, automatically. I am
not sure what to put in place of the NULLs. There seems to be no info
available on this.

Henry
 
W

WaIIy

I am currently using OLECMDEXECOPT_DONTPROMPTUSER in order to avoid any
keyboard intervention.

I am using m_WebBrowser.ExecWB(OLECMDID_SAVE, OLECMDEXECOPT_DONTPROMPTUSER,
NULL, NULL);

so that the PDF files will be stored, one after another, automatically. I am
not sure what to put in place of the NULLs. There seems to be no info
available on this.

Henry

This is a wild shot in the dark.....

DONTPROMPTUSER, o,o});
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top