Odpoveď na: Hromadna konverze Pages do PDF/DOC

Domov Diskusné Fóra Pomoc: software Hromadna konverze Pages do PDF/DOC Odpoveď na: Hromadna konverze Pages do PDF/DOC

#157566
ervin11
Účastník (Participant)

Tak si ma donutil to vyskusat… A funguje uplne bez problemov… Je ti ale snad jasne, ze tam musis mat nainstalovane Pages… Skusal som iba jeden – prave ten, ktory je pre iWork ’09, pre istotu ho pastnem:

Staci otvorit Script editor, vlozit, ulozit ako aplikaciu (pozor! nie ako skript) a pretiahnut nan subory, ktore chces skonvertovat. Bez problemu…

on open theFiles
tell application “Pages”
repeat with aFile in theFiles
open aFile
set docName to name of front document
— Remove .pages extension.
set prevTIDs to AppleScript’s text item delimiters
set AppleScript’s text item delimiters to “.pages”
— Add .pdf extension.
set docName to first text item of docName & “.pdf”
set AppleScript’s text item delimiters to prevTIDs
— Get folder that dropped file exists in.
tell application “Finder”
set sourceFolder to (container of aFile) as Unicode text
end tell — Finder
— Save file to folder that dropped file exists in.
set docPathAndName to sourceFolder & docName
save front document as “SLDocumentTypePDF” in docPathAndName
close front document
end repeat
end tell
end open