Copy link to clipboard
Copied
I have a load of scripts used to produce different PDF's. These will not work in the New InDsesign 2025.
Attched screenshot of error message.
This is one of the codes which I have used for over 10 years until the new version.
tell application id "com.adobe.indesign"
set _NoCrops to PDF export preset "No Crops"
set _Crops to PDF export preset "Crop NO Text"
set _dest to path to desktop as string
tell active document
set _Name to name
if _Name ends with ".indd" then
set _Name to text 1 thru -6 of _Name
end if
set noCropPath to _dest & _Name & " PROOF" & ".pdf"
set cropPath to _dest & _Name & " PRINT" & ".pdf"
export format PDF type to noCropPath using _NoCrops without showing options
export format PDF type to cropPath using _Crops without showing options
end tell
end tell
tell application "Finder"
set label index of file noCropPath to 7
set label index of file cropPath to 2
end tell
<Title renamed by MOD>
Thanks you Can now exprt the 2 PDF's and add the extra words to the file name using this line
set _dest to "Machintosh HD/Users/username/Desktop/"
Just need to sort label tag colour change.
I think i might be in way over my head here as I have no idea what to do with that i'm sorry.
By @Luke25170286g4xv
In your particular script, all you need to do is change
export format PDF type to mgFilePath using "HR PDF" without showing options
to
export format PDF type to (POSIX path of mgFilePath) using "HR PDF" without showing options
Copy link to clipboard
Copied
I am not allowed to save any files outside OneDrive folder.
By @mstavri
Can you please elaborate:
Does it mean that your company policies prohibit you from saving any files outside OneDrive? Or that there's an issue with InDesign saving outside OneDrive?
Copy link to clipboard
Copied
the only storage permitted for company files is on OneDrive. I have already tested with /Users/iorgulescudan/test/ with blank sample files and there are same errors.
Indesign has Full Disk access and One Drive acccess
Copy link to clipboard
Copied
the only storage permitted for company files is on OneDrive. I have already tested with /Users/iorgulescudan/test/ with blank sample files and there are same errors.
Indesign has Full Disk access and One Drive acccess
By @mstavri
Technically, you are still saving locally - and your files are automatically synchronised with OneDrive.
Copy link to clipboard
Copied
Ok this seems to be your problem:
file (export_path & OpenFileNameActiveWOExt & "-interactive.pdf")
Remove file - it cannot (and should not) be used with POSIX paths (same as alias). just use the POSIX path without anything else.
Copy link to clipboard
Copied
Thanks. now it works.
Copy link to clipboard
Copied
The probelm is that InDesign isn't producing the PDF's.
I have removed the last part of the code, this elimates the error code, because it can't find the PDF's on the desktop.
Looking at other comments about paths need changing, this line may be the problem
'set _dest to path to desktop as string'.
Can anyone advise how the path should be up dated to work in v20.0.
Copy link to clipboard
Copied
Looking at other comments about paths need changing, this line may be the problem
'set _dest to path to desktop as string'.Can anyone advise how the path should be up dated to work in v20.0.
By @LawtonKAR
for a quick solution, just use POSIX path of cropPath
i can't go further into depth about posix paths right now, but you can look up something like 'posix paths in AppleScript'
Copy link to clipboard
Copied
Thanks you Can now exprt the 2 PDF's and add the extra words to the file name using this line
set _dest to "Machintosh HD/Users/username/Desktop/"
Just need to sort label tag colour change.
Copy link to clipboard
Copied
I have a similar problem, but POSIX path didn't fix it for me.
The scenario is InDesign runs an ApplesScript routine to creatte either a jpg or pdf file from an IDML template. I have two users A & B. A is a Macos Admin, B is a regular user. The AppleScript works great when run from the AppleScript editor as either of them. The problem arises when InDesign is invoked from PHP running under Apache. When all the files are owned by A and Apache is running as user A all works as expected. However, if the files are owned by B, and Apache is running as B, when InDesign tries to do an export, it fails with a 'file is open' error. If the file is deleted before starting the Applescript the export does not output the file. But there is no error message.
I'd rather not run Apache as a user with admin rights. Any ideas?
Thanks,
Carl
Copy link to clipboard
Copied
I have a similar problem, but POSIX path didn't fix it for me.
The problem arises when InDesign is invoked from PHP running under Apache. When all the files are owned by A and Apache is running as user A all works as expected.
I'd rather not run Apache as a user with admin rights. Any ideas?
By @CarlForde
Frankly, I don't know much (well, anything) about running AppleScript from PHP under Apache. You didn't mention if the problem started after updating to InDesign 2025, or a macOS update, or something else. But if running as a user with admin rights solves the problem, then maybe it's the best solution.
Apple also keeps introducing all kinds of security changes which may affect your scenario, too. In any case, you may have better luck asking this question on stackoverflow.
Copy link to clipboard
Copied
We are replacing a Mac mini running Ventura 13.2.1 and InDesign 2023 18.2.1 with a new Mac mini running Sequoia 15.2 and InDesign 2025 20.1. Having Apache running as an admin user is bad practice from a security point of view. So I'd rather not do that.
Copy link to clipboard
Copied
Don't want to be too picky - but what you're trying to do - you should rather do using InDesign Sever?
Copy link to clipboard
Copied
We considered that. However the pricing $13,500/year is not in the budget.
Copy link to clipboard
Copied
We are replacing a Mac mini running Ventura 13.2.1 and InDesign 2023 18.2.1 with a new Mac mini running Sequoia 15.2 and InDesign 2025 20.1.
By @CarlForde
I know you're replacing your old Mac, but if you still plan to use it for more than a few hours, then make sure to update Ventura to its latest version. Anything below 13.5 can cause various issues with InDesign.
Copy link to clipboard
Copied
Hi all, apologies for tagging along with this post but i'm also having a similar problem since updating to Indesign 2025 (v20). We run a script which outputs indiviual pdf pages from a multi page document, named using a specific filename on a seperate layer into a HR Folder in the same folder location as the active indesign doc. This has worked for years prior, and still does with Indesign 2024 so just wondering what the fix could be here? Currently holding back on full update to 2025 but with a lot of other colleagues starting to update it's becomming a bit of a problem.
I run the script and it still runs as it should without any error messages however, in the HR PDF folder that it creates it is always empty with no PDF exported? Any help would be massively appreciated. Script we're using is attached below for ref - thank you!
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Thanks @Robert at ID-Tasker , explains it clearly for a novice like myself to understand! So knowing that, is there a way to adjust/tweak the current script for it to work in POSIX path Style at all?
Copy link to clipboard
Copied
Thanks @Robert at ID-Tasker , explains it clearly for a novice like myself to understand! So knowing that, is there a way to adjust/tweak the current script for it to work in POSIX path Style at all?
By @Luke25170286g4xv
POSIX path of yourHFSPath
Copy link to clipboard
Copied
Copy link to clipboard
Copied
No good unfortunately @Robert at ID-Tasker , tried both with the same result being an Error Number: 258
Copy link to clipboard
Copied
No good unfortunately @Robert at ID-Tasker , tried both with the same result being an Error Number: 258
By @Luke25170286g4xv
Can you post screenshot of the error message?
Copy link to clipboard
Copied
Of course, sorry @Robert at ID-Tasker see below.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
The below is what i changed in the script as you suggested. Apologies for my low key understanding of this, it's a script i've picked up from an ex employee so not something i usually delve into. Have i misunderstood what you suggested @Robert at ID-Tasker ?
Find more inspiration, events, and resources on the new Adobe Community
Explore Now