• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: download a PDF file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: download a PDF file


  • Subject: Re: download a PDF file
  • From: Doug McNutt <email@hidden>
  • Date: Sat, 31 Jan 2009 14:32:33 -0700

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 (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users


This email sent to email@hidden
  • Follow-Ups:
    • Re: download a PDF file
      • From: KOENIG Yvan <email@hidden>
References: 
 >download a PDF file (From: KOENIG Yvan <email@hidden>)

  • Prev by Date: Rép: download a PDF file
  • Next by Date: Re: download a PDF file
  • Previous by thread: Re: download a PDF file
  • Next by thread: Re: download a PDF file
  • Index(es):
    • Date
    • Thread