Copy link to clipboard
Copied
Hey guys,
I’m new to InDesign scripting and i’m trying to create an overprint script.
I want the script to change all the small text (below 8pt) on a document to overprint.
I’ve searched the net for overprint scripts but cannot seem to find much on it. Any tips to achieve this?
Many Thanks
1 Correct answer
Hi gp63139540,
You can set overprint for text by setting in Paragraph styles and character styles. Use the below code to set in all paragraph Styles and if you want to set for all character styles same way you can modify the code.
var pStyles = app.activeDocument.allParagraphStyles, myStyle;
pStyles.shift();
while (myStyle = pStyles.shift()) {
if(myStyle.pointSize<8){
myStyle.overprintFill = true;
}
}
Copy link to clipboard
Copied
Hi gp63139540,
You can set overprint for text by setting in Paragraph styles and character styles. Use the below code to set in all paragraph Styles and if you want to set for all character styles same way you can modify the code.
var pStyles = app.activeDocument.allParagraphStyles, myStyle;
pStyles.shift();
while (myStyle = pStyles.shift()) {
if(myStyle.pointSize<8){
myStyle.overprintFill = true;
}
}
Copy link to clipboard
Copied
Thanks mate. Appreciate the help.

