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

indesign preflight warn for only visible items

New Here ,
Nov 13, 2025 Nov 13, 2025

Hello.

 

I want to have a preeflight for indesign that only checks visible objects.

We have alot of hidden objects due to we work with a plugin Easy Catalog and its able to change things (for example price bubble/market bubble) depending on different variables.

 

I cant see you have that option when you set up an preeflight option.

Would it be possible to write/program a specific one that meets this demand?

Best regards Mattias

TOPICS
Feature request , Scripting , Type
304
Translate
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

Explorer , Nov 17, 2025 Nov 17, 2025

Hello Mattias,

 

Sorry for the delay. Save the InDesign document and run the script below. Then every time you save the document, the script updates the non-printing values to true if visible and false if not visible. After closing the document the script is not running anymore and the script engine is deleted after InDesign application is closed. This could be written also as an application level event listener; perhaps as a startup script. 

 

 

#targetengine session;
app.activeDocument.addEventListe

...
Translate
Explorer ,
Nov 13, 2025 Nov 13, 2025

Hello Mattias,

A cleaning script can be written, which deletes all hidden objects. That way the file size is reduced also. Of course if the hidden objects are needed later this is no good.

Cheers!

Funtom

Translate
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
New Here ,
Nov 13, 2025 Nov 13, 2025

Thanks for the tip, unfortunately the hidden objects may be needed later in the process.

Translate
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
Community Expert ,
Nov 13, 2025 Nov 13, 2025

Hi @mattiaso33135605 sorry if this is a dumb questions, but just checking that you have these options set?

Screenshot 2025-11-14 at 00.23.20.png

Translate
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 13, 2025 Nov 13, 2025

Hidden objects are not non-printing by default. This script below sets all hidden page items' non-printing value to true. Notice that hidden layer doesn't make its items hidden.  

 

doc = app.activeDocument;
for (var i = 0; i < doc.allPageItems.length; i++){
if (doc.allPageItems[i].visible == false) doc.allPageItems[i].nonprinting = true;
}

Translate
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
New Here ,
Nov 14, 2025 Nov 14, 2025

Hi Funtom.

First i didnt understand how to get this script/text in to indesign.

I duplicated an excisting .jsx file and put your code in to that and renamned it.

Worked good but how would you suggest to put code like this (im not a coder)

Anyway the script did exactly what i wanted, all the warnings dissapeared for the hidden objects but i also see that if you bring back a hidden object its still not effected by the preeflight (you dont get back a warning for the text overflow) is it possible to have this function included in one script so you just runs the same script after the document has been updated? or shall it be a second script that puts back the non-printing value as it was before on all showing objects, i hope you understands what i mean 😊

Translate
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
Community Expert ,
Nov 14, 2025 Nov 14, 2025

Do a 2nd one and change false to true and true to false 

Translate
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 17, 2025 Nov 17, 2025
LATEST

Hello Mattias,

 

Sorry for the delay. Save the InDesign document and run the script below. Then every time you save the document, the script updates the non-printing values to true if visible and false if not visible. After closing the document the script is not running anymore and the script engine is deleted after InDesign application is closed. This could be written also as an application level event listener; perhaps as a startup script. 

 

 

#targetengine session;
app.activeDocument.addEventListener("afterSave",change_nonprinting);
function change_nonprinting (){
doc = app.activeDocument;
for (var i = 0; i < doc.allPageItems.length; i++){
if (doc.allPageItems[i].visible == false) {
doc.allPageItems[i].nonprinting = true;
}
else {
doc.allPageItems[i].nonprinting = false;
}
}
}

 

Cheers!

Funtom

 

P.S. If there is a script used frequently, might make sense to apply a keyboard shortcut for it.

Translate
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