Skip to main content
dublove
Legend
Oct 26, 2025 7:36 AM UTC
Answered

How do I enable text wrapping and set non-printing?

Couldn't find any examples.

Looked through the developer documentation, but I don't know how to use it.

https://www.indesignjs.de/extendscriptAPI/indesign-latest/#ObjectStyle.html


Is this correct? It doesn't seem to work. It also shows a syntax error for nonprinting.

objectStyle.textWrapPreferences.properties = {
nonprinting: true,
}

dublove
dubloveCorrect answer
Legend
Oct 26, 2025 2:07 PM UTC

It seems to be this:
objectStyle.nonprinting = true;

6 replies

rob day
Community Expert
Community Expert
Oct 26, 2025 3:04 PM UTC

There is no nonprinting property is objectStyle.textWrapPreferences

 

https://www.indesignjs.de/extendscriptAPI/indesign-latest/#TextWrapPreference.html

 

You can set in on a pageItem:

 

https://www.indesignjs.de/extendscriptAPI/indesign-latest/#PageItem.html

 

If you do a search for nonprinting in the API docs, you’ll get a list of objects that have the nonprinting property:

 

 

 

 

Translate
dublove
dubloveAuthor
Legend
Oct 27, 2025 9:12 AM UTC

Hi rob day.

I need to add nonprinting to the object style.
I don't know how to add it to pageItem.

The following works:
objectStyle.nonprinting = true;

Translate
rob day
Community Expert
Community Expert
Oct 27, 2025 1:47 PM UTC

I don't know how to add it to pageItem.

 

For a pageItem it would be (nonprinting page items are hidden when Overprint/Separation Preview is turned on):

 

var pi = app.documents[0].selection[0]
pi.nonprinting = true
$.writeln(pi)
//returns the selected object

 

 

 

 

 

 

 

Translate
dublove
dubloveAuthorCorrect answer
Legend
Oct 26, 2025 2:07 PM UTC

It seems to be this:
objectStyle.nonprinting = true;

Translate
Legend
Oct 26, 2025 2:27 PM UTC

This is a Japanese site, but
http://indesign.cs5.xyz/dom/about.html
is also worth checking out.

Translate
dublove
dubloveAuthor
Legend
Oct 26, 2025 1:43 PM UTC

Found this switch, but couldn't locate the non-printing setting.
enableTextWrapAndOthers: true,

Translate