• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Extending preflight

Explorer ,
Oct 28, 2022 Oct 28, 2022

Copy link to clipboard

Copied

Is it possible to extend InDesign's preflight with additional features through ExtendScript? I have a script that checks the document for runts and widows – It would make a lot of sense if the checks were displayed in the preflight-panel.

TOPICS
Scripting

Views

247

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Guide , Oct 28, 2022 Oct 28, 2022

Not as far as I see it. You can manage preflight profiles and switch things off and on, but the switches are what you have available. 

Votes

Translate

Translate
Guide ,
Oct 28, 2022 Oct 28, 2022

Copy link to clipboard

Copied

Not as far as I see it. You can manage preflight profiles and switch things off and on, but the switches are what you have available. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 28, 2022 Oct 28, 2022

Copy link to clipboard

Copied

Thank you.

I have been digging through the documentation and couldn't find anything.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Oct 28, 2022 Oct 28, 2022

Copy link to clipboard

Copied

You might be able to get close with an event listener. Years ago I wrote a beforeSave handler to check for a peculiar workflow error. It displays an alert so that the page designer is aware of the problem and writes out a log file documenting the event.

If you already have the javascript code to identify the widows and runts, I'd think it would be pretty simple hook it up to the beforeSave event. The more complicated question would be how to report the results back to the designer.

Bob

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
People's Champ ,
Oct 28, 2022 Oct 28, 2022

Copy link to clipboard

Copied

You may as well build your own UI. Circa 2009, I worked with a digital publishing solution and we created a UI assistant that will let the designer know the possible issues in his document.

PressRunExporterScreenshot-530x362

 

As preflight is scriptable, you could still use preflight reports and append your own preflight routines and introduce the final report to the user in your very own interface.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 31, 2022 Oct 31, 2022

Copy link to clipboard

Copied

Thank you! That's a great solution. I have all of the check functions – I just needed a good way to fire them.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Nov 01, 2022 Nov 01, 2022

Copy link to clipboard

Copied

I went back and reviewed some old event-listener scripts to try to recall the ifs ands and buts. Seems to me that the main one is this: beforeClose fires after the document has been saved, if a save is needed.

If you intend to identify a problem and fix it in your script, beforeClose won't help. It looks like the problem is being fixed but then the document closes before it's saved. There may be a way around that, but I was never ever to find it. So, in these cases, I just  attached my script to a beforeSave handler. The script runs before every save, not just the last one, but who cares?

Sometimes the fix is more complicated than what you want to tackle in a script. Widow and runt control may be like that. So that's where I'd use the beforeClose event listener. The handler checks for the problem, asks the designer if they want to deal with it now and, if yes, uses the .preventDefault() method to keep the file open.

Hope this helps. And hope I'm recalling these details correctly.

Bob

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 02, 2022 Nov 02, 2022

Copy link to clipboard

Copied

LATEST

Hi Bob. That is super helpful – Thank you! The check is a little bit expensive to run on large documents, so i definitely have to confirm before running it.

Thank you for being so helpful!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines