Housekeeping Scripts

You finally have an approval on that print project you’ve been working on for the last few months. All that’s left to do is make a PDF for the printer and be done with it, right?

Nope. It’s time to do some housekeeping on the file. Let me use this metaphor, once you’ve made dinner, you don’t leave your dirty pots and pans in the sink, do you?

It’s time to do some housekeeping, and in this episode of “must haves” on the Colecandoo Youtube channel, we’ll look at several scripts to keep your files nice and tidy.


One word of caution with any of the scripts shown in the video. They are all destructive in nature. That is, they intentionally remove items from a document. Make sure you save your work prior to running these scripts, just in case they have a catastrophic impact on your artwork. I’m showing these scripts for educational purposes only, this is not a tutorial on how to use these scripts.

Images and Frames

Cleanup Pasteboard

The first script removes items from the pasteboard. Run the script and select the distance from the trim edge and importantly whether threaded text on the pasteboard should be removed.

I can hear some of you now saying “but what if I’ve left important notes on the pasteboard for the next person who works on the artwork”? Well, either don’t use this script, or put your notes on after you’ve run this script.

Empty Frame Remover

This script removes any purely empty frames, that is no fill or stroke that have no special settings applied such as text wrap or text on a path. Once run, it scans the document and removes all of these empty frames.

Trista DPI

The next script resamples all images over a given resolution to a more appropriate resolution. It’s great for projects such as yearbooks where the resolution of images is often far greater than it needs to be.

Now, I was in two minds to whether I show this script or not. Out of the scripts being shown in this video, this is both the most powerful and potentially most destructive of them. Ultimately, read the instructions before using this script, and make sure you have access to backups in case things go wrong.


Next, let’s address some colour issues that may have come about from selecting registration by mistake, or left-over swatches from a Microsoft Word import.

Unlike many scripts I’ve shown previously, most of these scripts are buried in forum posts, so it’s a matter of reading the post, finding the script, copying and pasting into a text editor and saving as a .jsx file.

It’s worth noting that all of these scripts only affect colours generated within InDesign, so won’t fix colour issues in links such as PDFs or photoshop files.

Add unnamed colours

Let’s start off with this easy one-line script that adds all unnamed colours to the swatches palette. True, it’s just as easy to select this from the swatches menu. Regardless how it’s run, this should be the first step to cleaning up the swatches. You can cut and paste it from below:

app.menuActions.item("$ID/Add All Unnamed Colors").invoke();

Reduce Colors

This script launches a prompt that allows you to search for colours that are a given percentage different from each other and merge them to the swatch that appears higher in the swatches panel.

If you’re using a special knockout black swatch and don’t want it to become the default black, perhaps make it a spot colour while running these scripts.

I explain the differences between these colours in more depth in Episode 14.

Registration Fix

This script converts all registration colour applied by InDesign to its respective tint of Black.

RGB/LAB GREY swatches to Shades of Black

I’ve written a script that converts RGB and LAB values that appear as shades of grey to equivalent shades of Black, while leaving other swatches alone to be dealt with by another script.

RGB/LAB swatches to CMYK

There’s another RGB/LAB converter, though this script converts all RGB/LAB swatches to CMYK values.

Faux Black fixers

There are two scripts that can take faux black values and convert them either to 100% black or rich black. The faux black is determined by CMYK values beyond certain percentages. In this case, any swatch that is over 70 Cyan, 60 Magenta, 60 Yellow and 90 Black will be converted to either 100% black or rich black. You can dig into the script if you like, and redefine what constitutes a rich black or faux black.

Remove unused swatches

This will remove any swatches not used in the artwork.

Styles, Master Pages and Layers

Let’s make sure that we only have the necessary styles, master pages and layers that are required for the artwork.

Remove unused masters

This script removes any master pages that have not been used in the artwork.

Remove unused layers

Next is this script that removes any layers that contain no artwork.

Remove unused styles and groups

This is a series of scripts that removes any styles not used in the artwork, as well as unnecessary style groups that may have been left, whether deep in folders or not. In the video it is combined into one “catch-all” script for convenience, but it is the work of many authors, so it’s not right for me to host it. Links to the originals can be found here, here, here, here and here.

Delete guides

Lastly, this script removes all guidelines in a document. I can see that there would be some use for guidelines to remain in a document, but felt it was worth demonstrating.


To be sure that the artwork is completely free of issues, we want to make sure that there are no prepress issues. To make sure that the artist complied with the preflight that was associated with the document, there’s the preflight enforcer.

As shown on the Colecandoo Youtube channel before, I’ve prepared two scripts that will either warn or prevent a user from printing or exporting to PDF until all preflight issues are resolved.

So there you have it, over ten scripts that will help make housekeeping of InDesign files a lot easier. If there’s any that I’ve missed or you feel would be worthy of a future video, let me know via my contact page.

Preparation for Color Separation

In recent times, I have received several pieces of “finished art” supplied by clients where the sales representative has informed me that the printed material must be “on-brand” according to the client’s style guides. That should be the end of the story, but upon checking the finished art, it is clear that the artwork has not met the client’s own style guides, or been thoroughly checked by the client prior to submission.

One of two things will now happen – the prepress department can either fix the artwork without disturbing the client in order to fulfil the brief and expedite the work, or we can contact the client informing them of the situation and THEN ask whether we can fix it or have resupplied artwork that is color correct. Considering that the client may receive their proof and resupply the artwork in its entirety, this means fixing the colors again.

For years, I’ve been an advocate of receiving finished artwork that is correct for the following reasons:

  • The client has correct content;
  • Eliminates the risk of human error in prepress from incorrect or unintentional manipulations during corrections;
  • Prepress can output more work considering they are not spending time manipulating files that may only be replaced at a moment’s notice;
  • My employer isn’t losing revenue on prepress time that usually is not passed onto clients by the sales representatives.

That said, I make sure to contact customers who have supplied finished art that is incorrect and outline the issue, giving them the opportunity to resolve the issue themselves or let us do it. It is at this stage where some customers have been willing to fix the artwork themselves, but cannot see the issue. When I ask them to check the separations preview panel, the answer is always the same – “where’s that?”. Because this is a panel that I use so often as a prepress operator, I often think to myself “are you kidding me?” but to be fair, there are many panels in InDesign that I don’t use such as the animations panel; and I would have no idea how to use either.

On that note, I have prepared a video on my Youtube channel on how to use the Separations Preview within Adobe InDesign and used it to highlight instances of color mismatches, issues with black ink, and when white overprints.

This is not the first time I’ve been on my soapbox about this before – (see this article). It also directly relates to:

I’m gonna knock you out, my printer didn’t knock you out…

An earlier post “To Overprint or not to Overprint, Black is the question” explains how the colour labelled [Black] in InDesign behaves, and when solid black ink should and should not knock out of the colours behind it.

Paying attention to this advice and applying it to artwork should result in a good printed reproduction, correct? While the answer should be yes, there is one more level of control of black appearance and overprints, and that is in the hands of the printing company and their output software.


Let us look at this following example:


This card is set up for a Black plus spot output for an offset press. The Black is only overprinting on the text as misregistration would be noticeable here, but the Black elsewhere is knocking out so that the colour does not look muted through the yellow.

However, despite best intentions and checking the separations both in InDesign and Acrobat, the card has printed like this (effect is exaggerated for the screen):


So what has happened? The separations were correct, they were checked in both InDesign and Acrobat! It turns out that the Raster Image Processor (RIP) software that the commercial printer uses to image the design onto the printing plates has its own settings. Here are some example screenshots from AGFA’s Apogee X system and Fuji’s XMF system respectively about the overprinting of black:



In both screenshots above, the respective RIP software CAN honor the settings that were in the initial PDF and not apply its own preferences, but in the instance of the business card, the RIP settings overrode the PDF settings and chose to overprint all instances of 100% black, regardless what swatches were chosen in InDesign.


Using the same artwork, the card was printed via a colour copier, but this time the result was as follows:


So what happened here? The while the solid black looks good, where the black in the top line meets the vignette looks rather weak, and there are is a lighter black around the travel agent. What is going on?

Again, the RIP software has manipulated the artwork with unintentional results. Unlike printing directly to a desktop printer, most digital printers will print to a RIP where the file can be imposed, colour adjusted and printed in whatever order the prepress operator sees fit.

Using the EFI Fiery RIP, there is a little-known feature of the RIP that changes the way black is displayed that can produce unexpected results, and that is in the color settings dialog box and it is “Pure Black On”.

Screen Shot 2013-06-03 at 2.55.28 PM

This setting takes every instance of 100K and ramps the colour to a “super black” as opposed to using the black toner only. Again, this setting can be changed, but when this card was printed, the defaults were unchanged resulting in this unwanted appearance.

This setting only applies to vectors and text AFTER the PDF is flattened into postscript. This is visible where the rich black abruptly changes to the muted black. One look at the flattener preview in InDesign confirms that areas of flat black in that image were as a result of the flattening.



This small example shows how changing the client’s intended black overprints can have unwanted consequences. For prepress operators it is a wake-up call to make sure that the RIP defaults will maintain the clients’ expected results; and for designers or publishers it is worth understanding that even the treatment of black overprint is an important topic.

You’ve gotta keep ‘em separated – check colour separations!

There is absolutely no doubt that submitting finished artwork as PDFs has eliminated several prepress issues such as missing links and (mostly) missing fonts. Sadly, it has not eliminated all prepress issues associated with submitting artwork. In this post, I would like to look in more detail at an issue which is to me a fundamental step before submitting finished artwork, and that is checking colour separations in a PDF – properly! Not doing so is a cardinal sin of prepress.

For this, I have created a mock-up black and two spot colour flyer for a favourite destination of mine, Montréal. On face value, the PDF appears to be fine, but after looking at the artwork in more detail such as the crop-marks and where the artwork bleeds, it is clear that the bleeds will need to be fixed.

This is issue one. The rest is fine, right?

No! To see the other issues, the output preview dialog box has to be open. To get there using Acrobat 9, go to the advanced tab, then print production… , then output preview

Suddenly, the preview changes a little. From here, it is possible to see checkboxes for both process plates and spot plates. This job is Black plus two spot colours, so all appears to be right so far… but what happens when the black channel is turned off?

Instead of disappearing, the black becomes lighter. This means that the black is not purely on the black separation, but rather all of the process separations. It should look like this:

So what is going on here? It would appear that the blacks are actually made of process despite appearing greyscale, the photograph may have been RGB or CMYK. The type, despite appearing black, may be made using RGB black. So how can this be determined?

In the output preview dialog box, there is a dropdown which says “Show”. By default, the dropdown result is All, and this means that all gamuts on screen are shown, but not necessarily what images are process, spot, RGB or LAB.

If the dropdown field is changed for example to RGB, it is possible to see what items on the page are RGB only.

After doing this, it appears that the type on the page is RGB which is why it isn’t colour separating properly into black. This means going back into InDesign and changing the RGB black to 100% Black. OK, one issue, but what about the masthead picture – that isn’t RGB. It is possibly made of a “faux black” out of process, so the dropdown needs to be changed from RGB to CMYK.

I can now see two things: what appears to be a black and white picture, and coloured type in the left middle of the page. To determine if the black and white picture is actually on the black separation only, the black separation has to be toggled off.

The image has become lighter, but not disappeared. This tells me that the image is made out of process instead of being greyscale. This means going into photoshop, making the colour mode greyscale, resaving, relinking in InDesign. That is two issues.

But why was there process coloured type? It should be two spot colour separations plus black. To check this, change the dropdown field to spot colour.

Now I can see the word Montréal in solid 494, the background in a tint of 494, and the strip of yellow 610. But the words “WHEN SHOULD I GO?” have disappeared. This infers that these items were not made out of spot colour, or they should be visible in this view. Instead, the items must be made out of process, as they were visible in the CMYK view, but not Spot Colour nor RGB views.

So after checking the PDF and its separations more thoroughly, I now know there are several fixes required for this PDF: The InDesign file needs to have the following changes:

  • Colour which extends past a trim area has to bleed off;
  • The RGB black type needs to be 100% black only;
  • The “black” photo of Montréal needs to be made greyscale;
  • The words “WHEN SHOULD I GO?” and yellow strip behind need to be changed from process to their appropriate spot colours.

I have prepared before and after PDFs for the purposes of trying what has appeared on this post.

%d bloggers like this: