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.

Pre-Sort Mail Pressure

Many articles on this blog feature advice for creating Variable Data Printing (VDP), but this post will focus on preparing VDP letters using Australia Post’s Pre-Sort Mail service. While the advice may not apply to everybody, there may be some information within the article that could still be relevant. With that out of the way, it is important to discuss what the Pre-Sort Mail Service is.

What is Pre-Sort Mail?

Australia Post offers many mailing services such as Clean Mail, Print Post and Acquisition Mail, but Pre-Sort Mail specifically refers to the delivery of barcoded mail throughout Australia.

What is the significance of Pre-Sort Mail?

Ultimately it is price and speed. As of 1 August 2014, an individual posting an addressed DL sized envelope under 125g from one Australian destination to another will pay 70 cents to post that letter (full rates of mail can be found at Pre-Sort Mail offers businesses a discount on their postage, provided that:

  • There are more than 300 items of addressed mail within Australia in one lodgement;
  • That the mail has been barcoded and lodged according to Australia Post’s standards.

With many items of post being substituted for email, one would ask what the importance of printed mail:

  • Conventional mail is tangible, something an individual can hold.
  • It confirms the street address of the receiver (e.g. letters that are marked return to sender will indicate if the receiver has moved).
  • It can’t be blocked with a spam-filter.

How does it work?

On the surface, “barcoded mail” would imply that the only process is to add a barcode to the mail… if only it were that simple. In fact the procedure is more complicated. The full procedure can be found here but a summary of the process that mostly involves a prepress operator is as follows:

  • The use of dedicated barcoding software to compare the client’s database to the Australia Post database. This applies a barcoded Delivery Point IDentifier (DPID – effectively an 8-digit number that represents a street address… think of it akin to a phone number, without using the actual phone number of that address) to clients’ addresses that match Australia Post’s addresses, and leaves the remainder unbarcoded. That should be the end of it, but sadly no… there is more.
  • Using this same dedicated software, creating a manifest that lists what letters are to be sent to specific mailing locations (not postcodes – one of 54 specific locations that receive the mail and then distribute the mail to their postcodes). The software then creates mailing tags for the cardboard or plastic tubs that will hold the finished articles for mailing. This is to identify the tubs to Australia Post employees who then send the tubs to the appropriate mailing locations.
  • Once the data is exported from the dedicated software, the data then has to be “mail merged” (or Data Merged via InDesign) but it must be in the same order as the manifest. This creates many production headaches such as how to split the merge for the appropriate destinations, dealing with “spoils” (letters that are damaged during their production) etc.

What are the pressure points?

  • The dedicated barcoding software. It isn’t cheap, and this leads to many businesses reconsidering the idea of barcoding their own mail in-house, given the return on investment of mail savings is eaten by the subscription fee to the dedicated software. The software tends to be Windows Operating System specific and requires ongoing updates from Australia Post to maintain current address data.
  • Quality of a customer’s database. Items such as soft returns, address fields where the suburb-state-postcode details are in one field instead of three separate fields can hamper not just the dedicated barcoding software, but its import into InDesign. Similarly, values that need to be presented in a set format (such as dollar values, or names needing to be title-cased rather than UPPER cased) need to be resolved before importing the data into InDesign. Another trap is the length of fields – for example, a design feature that allows for most full names that would be 15-25 letters long, but names in the database that can be 35-45 letters long may not fit the space required, unless the square peg round hole trick is used.
  • The strict rules set down by Australia Post for lodgement, such as the height, width, clear zones and allowable skew of the barcode. These rules also apply to the appearance of the envelope, particularly if an address is being printed onto the envelope instead of using a window-faced envelope.
  • The speed of the lodgement. This will determine what postage paid imprint is to be used on the items to be mailed.

The last pressure point is the one that will catch out many customers and sales representatives alike. Since its introduction on 2 June 2014, Australia Post has introduced two speeds to business mail: Priority and Regular. Apart from the lodgement, the other way that this is indicated to Australia Post staff is the imprint graphic on the top right hand corner of the envelope.

What this effectively means for customers is that instead of having one variety of business envelope stationery, they now need to have two varieties for the different delivery speeds, unless the customer wants to stick to one variety of stationery, and this will lock them into a set delivery speed. At the same time, printers and mailing houses have to be aware of this when asking clients for a delivery deadline, especially if envelopes supplied by the client are at a different delivery speed to the requested lodgement speed.

What do I need to remember?

It is possible to save money on your postage by using the Pre-Sort Mail program via a Printing company or Mailing House. My employer offers this service, but it is worth asking a few questions in advance:

  • Can they barcode letters from the database I’m using, and what is the best way to supply the data?
  • If I have a set date I would like the letters in the hands of customers, when should I have my data and letter ready to begin the campaign?
  • What items can be variable on the letters that I send? Is it just type, or can I have graphs, barcodes such as QR codes, or images tailored to each letter?


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.

“Spot” the difference of soft light with overprint preview

I recently found myself being the “bad guy” after having to instruct a customer to resupply their artwork given that many of the effects applied to the pictures in InDesign would not print as desired.

In short, the artwork was an annual report printed in full colour plus a metallic silver spot colour. Originally supplied PDF only, everything looked fine on first glance with the overprint preview off. However, while the document was being manually preflighted using Acrobat’s Output Preview, I had noticed that a greyscale-like effect on the silver had disappeared once I had entered the Output Preview. Concerned, I restarted Acrobat to make sure the glitch was not software related, but again the same thing appeared. This happened on several machines and it soon became apparent that the artwork would in fact print as it appeared in Output Preview rather than the normal preview.

The customer was then contacted and informed of the situation. After replying that the artwork looked fine on his screen, the customer was then instructed to turn the overprint preview on within InDesign, and lo and behold… he began to see what I saw. He then told me he had used the soft light effect.

To demonstrate the phenomenon, I have created a new InDesign file with five elements: a rectangle coloured with Pantone 871C; a rectangle coloured with the default green which ships with InDesign; a stock photo with the soft light effect applied , and two captions of the colours in the rectangles. In the before image, the Separations preview is turned off.

and this is how the InDesign file looked after the separations preview was turned on:

resulting in the image disappearing from Pantone 871C rectangle. However, the image still appears over the process green rectangle.

Ultimately, this means that the effect is only reproducable over process colour, and not spot colour, regardless whether it is metallic or not.

Interestingly as well was the fact that in Live preflight, there was no error warning of this particular feature of the soft light effect, so if I was purely to obey the live preflight and not check my file with the separations preview or overprint preview, this would have been completely missed.

The lesson here? Always check artwork using the separations preview to make sure the artwork will appear as designed, and that some effects will work in process only.

%d bloggers like this: