Copy link to clipboard
Copied
Since 2018, we have been using several scripts for PDF export, which worked perfectly. Unfortunately, since the 2025 update, there is no error message, but it does not create the requested pdf.
This is how the script source looks like:
tell application "Adobe InDesign 2025"
set mgFolder to file path of active document
set mgName to name of active document
set text item delimiters of AppleScript to {"."}
set mgShortName to text item 1 of mgName
set text item delimiters of AppleScript to ""
set page range of PDF export preferences to "All"
tell application id "com.adobe.InDesign"
set mgFilePath to mgFolder & mgShortName & ".pdf" as string
tell active document
export format PDF type to mgFilePath using "Kosmos_BoardGame_2017" with page range without showing options
end tell
display alert "A pdf elkészült a Kosmos_BoardGame_2017 presettel."
end tell
end tell
It should copy the pdf file next to the Indesign file, but it does not appear.
What should be changed in the script to make it work again?
Thank you.
Copy link to clipboard
Copied
Have you tried creating subfolders inside your Scripts folder for older scripts? I've got some VERY old scripts from InDesign CS2 in a 'Version 4.0 Scripts' subfolder that still work. I assume CC2024 scripts would be 'Version 19.0 Scripts'.
Copy link to clipboard
Copied
Once upon a time script compatibility across versions was a high priority.
While AppleScript still supports the alias type for HFS paths, someone missed that InDesign's general switch to posix paths trickled thru to the scripting subsystem. And, incompletely at that.
E.g. the file path property of your active document still yields an alias.
On the other hand, the export now requires a posix file.
Btw no need for the double tell application ….
tell application id "com.adobe.InDesign"
set mgFolderAlias to file path of active document
set mgFolder to POSIX path of mgFolderAlias
set mgName to name of active document
set text item delimiters of AppleScript to {"."}
set mgShortName to text item 1 of mgName
set text item delimiters of AppleScript to ""
set page range of PDF export preferences to "All"
set mgFilePath to mgFolder & mgShortName & ".pdf" as string
tell active document
export format PDF type to mgFilePath using "Kosmos_BoardGame_2017" with page range without showing options
end tell
display alert "A pdf elkészült a Kosmos_BoardGame_2017 presettel."
end tell
Copy link to clipboard
Copied
Very good, the script works fine again.😀
I can't thank you enough for this! thank you very much for the quick help!
Find more inspiration, events, and resources on the new Adobe Community
Explore Now