473,789 Members | 2,433 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How do I retrieve and save a .PDF from a website?

Hello All,

Its a bit more complicated than the subject line implies.

A website that I use for information allows me to click on a link and their .PDF displays in IE's browser window.. Since this data has a life-span
of about a week (replaced by a newer updated one on a daily basis) and if I happen to miss a day viewing and recording the info I want, its gone
forever.

To solve this problem, I wrote a small app to retrieve their index page of the info into a vb.net webbrowser control. This works fine for viewing,
but now I want to save the retrieved file as a .PDF on my local system. (It does bring up the Adobe toolbars and commands in the browser window and I
can save from there.) I want this to be "automatic" so I can set my app to run through the task scheduler and I won't have to be present to download.

The .PDF files are not accessible directly from a directory. Each of the links from the index page is directed to a Javascript (I believe) routine
with some parameters. And apparently from that script, the proper location of the file is determined and subsequently returned to my browser control
as a PDF file.

A sample of my code is below. (After the Navigate command, how do I save the contents of wbPage as a PDF?) Can I essentially do a Navigate directly
onto a local drive?

Thanks,

Hexman
-------------------Code Sample---------------------------
wbPage - System.Windows. Forms.WebBrowse r

wbPage.Navigate ("http: //www.somewebsite .com/locatePDF.do?fi lename=ENV06070 8.pdf")

'File.WriteAllB ytes("c:\SavedP DF.pdf", wbPage.Document Stream) <--- doesn't work
Jul 8 '06 #1
0 1483

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
12363
by: Didier FRAISSE | last post by:
i need to retrieve every day an email and to save his attachments for later processing. i found some piece of code in the documentation like import poplib pop = poplib.POP3(Host) pop.user(User) pop.pass(Pwd) nbMsg, nbOctet = pop.stat() for n in range(nbMsg):
0
1115
by: nyousfi | last post by:
Hi everyone, I hope you can help! I have the following query accesing an SQL Server 2000 Box SELECT website.websiteID, website.description, website.URL, website.DepartmentID
2
2066
by: PDXWilliam | last post by:
Hello, I'd really appreciate help on this. I'm programmatically retrieving data from a website and on one particular page, I'm figure out what I should be sending to grab this data. Please bear with me for a 15 second demo that explains it more clearly ... At this website:
3
1785
by: Mal Reeve | last post by:
Hello, I am looking for an easy way to retrieve a file from a given website.. I am building an app that will retrieve a .csv file then TRANSFER text it into a table for further processing.. Any pointers would be greatly appreciated. TIA
2
2857
by: will | last post by:
hi, my ISP doesn't have webmail service, so i use TcpClient & Friends to issue POP3 commands to retrieve emails, store data on a website, and use that website to view emails. it all works fine with text-only emails, but it doesn't store attachments correctly. all attachments are displayed 'raw'. how do i deal with this problem?
1
261
by: Brian Henry | last post by:
Here is a simple problem, havent worked much with HTTP streams so haven't done this yet... I want to access a picture located at http://www.somesite.com/images/imagename.jpg then save it to a local file. how would i do this? thanks!
3
8563
by: fiefie.niles | last post by:
I would like to save a web page to a file and have the hyperlinks work when I bring the file back up. If the web page has a hyperlink like the following <a href="OurWeb/News/abcFile.htm">, after saving the file and showing it on the screen, and you try to click on the link, it will try to go to C:\OurWeb\News\abcFile.htm instead of www.MyWebSite.com/OurWeb/News/abcFile.htm. If I am on the website www.MyWebSite.com, and do "File" - "Save...
1
3018
by: deepaks85 | last post by:
Dear Sir, Is there any way to Get / Retrieve data from any website? I want the contents from a website into my website so that the contents can automatically update if the contents get changed in original website. How can I do that? Please help me out.
1
1554
by: ASPLearner | last post by:
Hi, I am trying to retrieve contect from other website and save it to database. Anyone can help? For Example: I want my script go to a webpage and retrieve someone's first name, last name & address automatically. After I get the details, I want to save to my database. Can I do something like this? Thanks in advance!
0
9661
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9506
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10403
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9978
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9015
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7524
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5414
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3695
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2904
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.