Starou / SimpleIDML

Manipulate Adobe® InDesign® IDML files
Other
209 stars 35 forks source link

InDesign Server 2020 returns "The property is not applicable in the current state" when export.jsx sets certain PDF options #60

Closed kylehodgson closed 2 years ago

kylehodgson commented 2 years ago

I'm using SimpleIDML with InDesign Server 2020 on MacOS, and when attempting to export my IDML file to PDF export.jsx InDesign Server rejects the job. Removing properties one by one I tracked it down to a few different properties that cause issues.

I have a PR incoming that wraps each of these properties in a try, such as were already found for ignoreSpreadOverrides on line 144 and simulateOverprint on line 211 of export.jsx. I also added an alert to the catch; for my instance of InDesign Server this causes the exception message to be logged, so that users will know which properties failed to be set.

Starou commented 2 years ago

Hi @kylehodgson and thanks for your contribution. Are you using the script within a SOAP call context? Are the alert logged into a file? Thanks.

kylehodgson commented 2 years ago

Yes, that's right, SOAP calls to InDesign Server. I start InDesign Server in a terminal window, and I see the alert messages in that terminal. I believe they would be sent to server logs in normal operation.

I experimented with console.log first which didn't work. I found InDesign Server users referring to alert for debugging.

I have not been able to try this technique with any other environments, only InDesign Server 2020 on macos.