Re: PDF to BMP
Re: PDF to BMP
- Subject: Re: PDF to BMP
- From: Duncan Cowan <email@hidden>
- Date: Tue, 25 Feb 2003 11:39:24 +1100
From: Rick Norman <email@hidden>
Date: Mon, 24 Feb 2003 17:02:30 -0600
To: Duncan Cowan <email@hidden>
Subject: Re: PDF to BMP
But how would you handle 25,000 files?
One at a time?
=)
Here is a script that will probably scare the pant off most decent, hard
working Applescripters . .
there is no error checking and the syntax is fearsome, but this is exactly
how I'd do it in typical "let's get this done" kind of way...
At the end you will wind up with a folder full of PSD files which can easily
be batched to any other format you'd like
(watch for line breaks)
property dskTop : (path to desktop folder) as string
property inFolder : dskTop & "in:" -- temp folder used by Photoshop action
property outFolder : dskTop & "out:" -- final files
property pdfFolder : dskTop & "PDF:" -- your PDF files
--
set pdfList to list folder pdfFolder without invisibles -- your PDF file
names as list. . .
repeat with i in pdfList
-- this can probably be done with one line
set PDFname to i as string -- get name of file
set PDFname to characters 1 thru -5 of PDFname as string -- strip
extension
--
tell application "Finder"
set targetPDF to move alias ((pdfFolder & i) as string) to folder
inFolder -- isolate file
set name of targetPDF to "myPDF.pdf" -- this is the name of the file
in your pre-recorded PSD Action
end tell
--
with timeout of 1000 seconds -- if needed?
tell application "Adobe. Photoshop. 6.0.1"
do script "PDF" -- recorded action << Convert Multipage PDF to
PSD
(* you need to manually set this up beforehand . . . put a pdf
file into the "in" folder,
rename it "myPDF.pdf", record an action called "PDF" that uses
"convert multipage pdf" to open "myPDF.pdf"
and then save it back into the "in" folder *)
end tell
end timeout
--
tell application "Finder"
delete item ((inFolder & "myPDF.pdf") as string) -- you might not
want to do this so . .
-- move item ((inFolder & "myPDF.pdf") as string) to "Where:ever"
set newPDFs to list folder inFolder without invisibles -- get list
of PSD files
repeat with i from 1 to count of newPDFs
set myPDF to item i of newPDFs
set targetPDF to move alias ((inFolder & myPDF) as string) to
folder outFolder
set name of targetPDF to i & "-" & PDFname & ".psd" as string
end repeat
end tell
end repeat
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.