Re: download a PDF file
Re: download a PDF file
- Subject: Re: download a PDF file
- From: KOENIG Yvan <email@hidden>
- Date: Sat, 31 Jan 2009 22:55:33 +0100
Thanks,
I will look at that tomorrow.
Yvan KOENIG (from FRANCE samedi 31 janvier 2009 22:55:28)
Le 31 janv. 2009 à 22:32, Doug McNutt a écrit :
At 21:45 +0100 1/31/09, KOENIG Yvan wrote:
on downloadGuide(l, t1, t2)
set fname to t1 & "09_" & t2 & ".pdf"
set u to "http://manuals.info.apple.com/" & l & "/" & fname
set stream to do shell script ("curl " & quoted form of u)
tell application "Finder" to make new file at folder p2d with
properties {name:fname}
write stream to file (p2d & fname) starting at 1
end downloadGuide
PDF files should not have line-end problems. It's possible that the
streaming procedure has something to do with it. Are you sure
you're getting a PDF and not an error page?
curl -o $HOME/Desktop/localname http://distantpath
ought to do what you want without bothering with streams.
curl -O http://distantpath/distanffilename will use the
distantfilename as the local name in the current working directory
but "do shell script" requires tricks to set the directory. A "do
script" as a command to Terminal.app would be easier for that.
curl -B ftp://distantpath
will attempt to use the FTP standard that converts line ends to
those appropriate for the local machine but it should not be
necessary for PDF files and it requires support for FTP at the
distant end.
curl's -v is quite useful for identifying problems during transfer.
--
--> Life begins at ovulation. Ladies should endeavor to get every
young life fertilized. <--
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (applescript-
email@hidden)
Help/Unsubscribe/Update your Subscription:
@tele2.fr
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden