AppleScript Indesign export pdf avec différent paramètres
Bonjour,
Je souhaite réaliser un script en Indesign pour créer un PDF pour impression et un autre basse définition mais je bloque.
Pour l'instant j'en suis là:
Code:
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
| on run
--set t1 to "0"
set t1 to (choose file with prompt "Selectionner le fichier indd :") as string
set RESO to choose from list {"1", "2", "3", "4", "5"} with title "Page" with prompt "Quelle page exporter ?" default items "1" as text
set resultat to 1
with timeout of 480 seconds
tell application "Adobe InDesign CC 2015"
open file t1
end tell
end timeout
set prelist to {"[High Quality Print]", "[PDF/X-1a:2001]", "[PDF/X-4:2008]"}
tell application "Adobe InDesign CC 2015"
set p to file path of active document
tell application "Finder"
set pf to parent of folder p as string
end tell
set n to name of active document
set n to characters 1 thru -6 of n as string
set page range of PDF export preferences to all pages
set view PDF of PDF export preferences to true
set theName to n & "-" & "HR.pdf"
set thePath to pf & theName as string
export document 1 format PDF type to thePath using PDF export preset "5 mm coupes sans calques"
set theName to n & "-" & "LR.pdf"
set thePath to pf & theName as string
export document 1 format PDF type to thePath using PDF export preset "Pdf-fichier-HD"
end tell
end run |
Avec dans l'idée, d'avoir un fichier Indesign multi-pages et de lui demander d'exporter que la page que je souhaite (la variable RESO).
Je souhaiterais également renommer le PDF et ne pas lui donner le nom du fichier Indesign.
Une idée?
Merci d'avance