Welcome to the { mindfrost82.com } forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

Go Back   { mindfrost82.com } > Gadget Corner > Tech Newsgroups > Programming > Visual Basic

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-05-2008, 10:16 PM
MHMol
 
Posts: n/a
how to save internet pages (pdf)

Hi all
Can anyone tell me how to save pdf files on the internet with VB.
The pdf files are numbered sequentially, so let's say the URL is:

"http:\\www.abc.com\page01.pdf"
"http:\\www.abc.com\page02.pdf"
"http:\\www.abc.com\page03.pdf"
etc.

I've been manipulating a sample program (ActXDoc.vbp), so that it produces
these files just by clicking a button. But it is very tiresome to have to
save them all by hand. Is there someway to automize this proces and save
these pdf's directly into a file on the harddisk?

Any help is greatly appreciated.

Thank you.

Margreet Mol



Reply With Quote
  #2 (permalink)  
Old 01-07-2008, 09:16 AM
Dean Earley
 
Posts: n/a
Re: how to save internet pages (pdf)

MHMol wrote:
> Hi all
> Can anyone tell me how to save pdf files on the internet with VB.
> The pdf files are numbered sequentially, so let's say the URL is:
>
> "http:\\www.abc.com\page01.pdf"
> "http:\\www.abc.com\page02.pdf"
> "http:\\www.abc.com\page03.pdf"
> etc.
>
> I've been manipulating a sample program (ActXDoc.vbp), so that it produces
> these files just by clicking a button. But it is very tiresome to have to
> save them all by hand. Is there someway to automize this proces and save
> these pdf's directly into a file on the harddisk?


Use the Inet transfer control (or inet API) to download the URL.
It makes no difference what file type it is.

--
Dean Earley (dean.earley@icode.co.uk)
i-Catcher Development Team

iCode Systems
Reply With Quote
  #3 (permalink)  
Old 01-07-2008, 09:42 PM
CajunCoiler
 
Posts: n/a
Re: how to save internet pages (pdf)

And lets not forget the automization... put the part number into a FOR-NEXT
loop along
with the FORMAT function to set the URL name...

Dim x As Long
Dim URL As String
For x = 0 To 3
URL = "http:\\www.abc.com\page" + Format(x,"0#) + ".pdf"
'insert download function here -- example: Call Dload(URL)
DoEvents
Next x


"Dean Earley" <dean.earley@icode.co.uk> wrote in message
news:4781ee07$0$13926$fa0fcedb@news.zen.co.uk...
> MHMol wrote:
>> Hi all
>> Can anyone tell me how to save pdf files on the internet with VB.
>> The pdf files are numbered sequentially, so let's say the URL is:
>>
>> "http:\\www.abc.com\page01.pdf"
>> "http:\\www.abc.com\page02.pdf"
>> "http:\\www.abc.com\page03.pdf"
>> etc.
>>
>> I've been manipulating a sample program (ActXDoc.vbp), so that it
>> produces these files just by clicking a button. But it is very tiresome
>> to have to save them all by hand. Is there someway to automize this
>> proces and save these pdf's directly into a file on the harddisk?

>
> Use the Inet transfer control (or inet API) to download the URL.
> It makes no difference what file type it is.
>
> --
> Dean Earley (dean.earley@icode.co.uk)
> i-Catcher Development Team
>
> iCode Systems



Reply With Quote
  #4 (permalink)  
Old 01-08-2008, 09:02 PM
MHMol
 
Posts: n/a
Re: how to save internet pages (pdf)

Thank you for your reaction.
I think you are right, this control is what I have to use. But I can't get
it to work yet.
I suppose I have to use the following code:

Inet1.Execute txtURL.Text, _
"GET GetThis.txt C:\MyDocuments\GotThis.txt"

The above I copied from the available example.

txtURL.Text is my URL (http:// etc. etc.), but what do I use after the GET
operation? As it is now, it doesn't work. The Help function doesn't give me
any clue at all what this 'GetThis.txt' and 'C:\MyDocuments\GotThis.txt' is.
And, as I mentioned before, I'm not retrieving text, but a pdf.

Thanks for helping!!

Margreet Mol



"Dean Earley" <dean.earley@icode.co.uk> wrote in message
news:4781ee07$0$13926$fa0fcedb@news.zen.co.uk...
> MHMol wrote:
>> Hi all
>> Can anyone tell me how to save pdf files on the internet with VB.
>> The pdf files are numbered sequentially, so let's say the URL is:
>>
>> "http:\\www.abc.com\page01.pdf"
>> "http:\\www.abc.com\page02.pdf"
>> "http:\\www.abc.com\page03.pdf"
>> etc.
>>
>> I've been manipulating a sample program (ActXDoc.vbp), so that it
>> produces these files just by clicking a button. But it is very tiresome
>> to have to save them all by hand. Is there someway to automize this
>> proces and save these pdf's directly into a file on the harddisk?

>
> Use the Inet transfer control (or inet API) to download the URL.
> It makes no difference what file type it is.
>
> --
> Dean Earley (dean.earley@icode.co.uk)
> i-Catcher Development Team
>
> iCode Systems
>




Reply With Quote
  #5 (permalink)  
Old 01-10-2008, 12:12 AM
CajunCoiler
 
Posts: n/a
Re: how to save internet pages (pdf)

If you're using an Inet object, as indicated by the example you
found, you'd probably do best with an OpenURL operation
for your download method...

Example...

Public Sub Down_Load(NetModule As Inet, strURL As String, strFolder As
String)
Dim f As Integer
Dim b() As Byte
NetModule.AccessType = icUseDefault
b = NetModule.OpenURL(strURL, icByteArray)
f = FreeFile
Open strFolder + "\" + strURL For Binary As #f
Put #f, , b
Close #f
While NetModule.Stillexecuting = True
DoEvents
Wend
End Sub
'
'
' Call Down_Load(Inet1.Name, txtURL.Text, strDestinationFolder.Text) '
'
'

That is the exact Sub I use in my "Grabber", "GetApod", and
"AdminPanel" applications, and it hasn't failed me yet for snagging
a file of ANY type from the "net".

"MHMol" <nospam_mhm0l@hotmail.com> wrote in message
news:4783e4ee$0$18862$bf4948fe@news.tele2.nl...
> Thank you for your reaction.
> I think you are right, this control is what I have to use. But I can't get
> it to work yet.
> I suppose I have to use the following code:
>
> Inet1.Execute txtURL.Text, _
> "GET GetThis.txt C:\MyDocuments\GotThis.txt"
>
> The above I copied from the available example.
>
> txtURL.Text is my URL (http:// etc. etc.), but what do I use after the GET
> operation? As it is now, it doesn't work. The Help function doesn't give
> me any clue at all what this 'GetThis.txt' and
> 'C:\MyDocuments\GotThis.txt' is.
> And, as I mentioned before, I'm not retrieving text, but a pdf.
>
> Thanks for helping!!
>
> Margreet Mol
>
>
>
> "Dean Earley" <dean.earley@icode.co.uk> wrote in message
> news:4781ee07$0$13926$fa0fcedb@news.zen.co.uk...
>> MHMol wrote:
>>> Hi all
>>> Can anyone tell me how to save pdf files on the internet with VB.
>>> The pdf files are numbered sequentially, so let's say the URL is:
>>>
>>> "http:\\www.abc.com\page01.pdf"
>>> "http:\\www.abc.com\page02.pdf"
>>> "http:\\www.abc.com\page03.pdf"
>>> etc.
>>>
>>> I've been manipulating a sample program (ActXDoc.vbp), so that it
>>> produces these files just by clicking a button. But it is very tiresome
>>> to have to save them all by hand. Is there someway to automize this
>>> proces and save these pdf's directly into a file on the harddisk?

>>
>> Use the Inet transfer control (or inet API) to download the URL.
>> It makes no difference what file type it is.
>>
>> --
>> Dean Earley (dean.earley@icode.co.uk)
>> i-Catcher Development Team
>>
>> iCode Systems
>>

>
>
>



Reply With Quote
Reply

  { mindfrost82.com } > Gadget Corner > Tech Newsgroups > Programming > Visual Basic


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 09:50 PM.


Powered by vBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
© 1999-2008 mindfrost82.com v11.0


Sponsors:
Remortgaging | Buy PSP | Mobile Phones | Loans | Credit Cards



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114