What is SizeLabels?
SizeLabels is a script for Adobe InDesign that adds a small label frame next to each frame in your document, displaying the size of the associated frame. It’s been tested with InDesign 2023 and above.
Installing SizeLabels
- Download PluginInstaller.
If you’ve not done this before, download and install the free PluginInstaller from PluginInstaller.com. Make sure you have build #558 or higher installed (the build number is shown in the lower right-hand corner of the PluginInstaller windows). - Create an Account.
If this is your first time using PluginInstaller, you’ll need to create a new account and register it within PluginInstaller. Make sure to click the confirmation link in the registration email! - Add a SizeLabels Bookmark.
Add a bookmark for SizeLabels into PluginInstaller by clicking the following link:Add SizeLabels Bookmark into PluginInstaller
Alternatively, you can use the Browse the Store for Software window in PluginInstaller and find the SizeLabels bookmark in the Rorohiko Catalog. - Download and Install.
Once the bookmark is listed in the Installing and Ordering window, select it and click the Download button.
After the download, choose your InDesign version from the Install Target dropdown menu and click the Install button.
SizeLabels will appear in the InDesign Scripts panel under the User section.
Optional ‘Pro’ Features Purchase
SizeLabels is free to use, but it can be enhanced with ‘Pro’ features for a yearly fee of US$4.00 via PluginInstaller.
A 30-day trial period for the ‘Pro’ features is available upon first installation.
How to Use SizeLabels
- Run the Script: After installation, open the Scripts panel (Window > Utilities > Scripts). Double-click SizeLabels.jsx to run it. This will add a small text frame showing the width and height of each frame in the document.
- Updating Labels: Labels are not live. If you move or resize frames, re-run the script to update the labels.
- Removing Labels: Labels are placed on a separate layer named SizeLabels. To remove all labels, delete this layer via the Layers panel (Window > Layers).
Using the Sample File
The InDesign Scripts panel also includes an entry called Copy Sample File with Documentation to Desktop.jsx.
Double-click this to access a sample InDesign file containing a reusable sample configuration.
You can use this file to experiment with SizeLabels and understand how it works.
Purchasing
To retain access to ‘Pro’ features after the 30-day trial, pay a $4.00 fee via PluginInstaller. The activation lasts for a year.
Go to the Installing and Ordering window, select the SizeLabels bookmark, and click Purchase.
Activation may take some time to process; keep an eye on the Licenses, Activations, and Pending Orders window for updates.
Cookbook
Suppose you have some very precise specifications for the sizes for the individual frames in your document.
You could work your way through the document frame by frame and verify all the sizes. Or print a proof of the document, and then someone could sit down and verify each printed frame with a ruler to make sure the size is correct. But why not let InDesign do the work?
So here is our document:
I have already installed SizeLabels on my computer. When I bring up the Scripts palette (via the Window – Utilities – Scripts menu):
I can see the SizeLabels.jsx script sitting on the Scripts palette.
I now double-click the SizeLabels.jsx script on the palette to set things in motion.
A few seconds later, my layout looks like this:
As you can see, a small text frame has been added in the top left corner of every frame. In the small text frame you can see the width and height of the corresponding frame.
In the default configuration, the frame size is expressed in inches. If you don’t want inches – don’t despair! I’ll explain how to configure the script to use another measurement unit later.
Note: the size labels are not ‘live’: if you move one or more frames, the associated size labels won’t auto-adjust or stay attached to their associated frame.
Instead, you should double-click the script on the Scripts panel again. The script will then re-generate and reposition the labels as needed.
In other words: each time you modify the layout you should re-run the script to update the labels.
At some point in time you’ll want to take away those added text frames.
Easy: the script has put all these label frames on a separate layer, named SizeLabels. To delete all the added labels in one go, simply delete the layer.
Bring up the Layers panel via the Window – Layers menu:
Select the SizeLabels layer, then click the little trash can icon:
InDesign will show an alert – proceed by clicking OK.
All the size labels will disappear.
Using a different text style
Changing the text style in the size labels is easy.
SizeLabels.jsx will try and find a paragraph style SizeLabelStyle in the document, and when it finds such a style by that name, it will apply it to the text in the size labels as it creates them.
If you don’t have a paragraph style by that name, SizeLabels.jsx will use whatever is the default style for your document.
Let’s create a style that makes those labels use Comic Sans, 12 pt.
Bring up the Paragraph Style palette via the Type – Paragraph Styles menu.
On the Paragraph Style panel, you need a style named SizeLabelStyle. If you have copied the sample frame from our sample document, that style will already be present. If not, create a new style by that name.
The name must be SizeLabelStyle. Don’t add any spaces anywhere in the style name – it has to be exactly right.
In the Basic Character Formats, you can adjust the font and size:
You can adjust any style setting you like in this dialog; for example, you could pick a different character color if you wanted, or you could have the text centered instead of left-aligned. Feel free to experiment. Click OK when you’re done.
Now run the script, exactly as shown before (i.e. double-click the SizeLabel.jsx on the Scripts palette).
And thanks to the power of paragraph styles, once the paragraph style is in place, you can continue to modify the paragraph style SizeLabelStyle to your liking after you’ve run the script.
All size labels will immediately pick up those changes, without needing to re-run the script.
Using a different text frame style
If you wanted to make the size label have a background color, and , say, apply a small text inset, you can do that by means of an object style.
Just like the SizeLabelStyle paragraph style, the SizeLabels.jsx script will also look for an object style by the name SizeLabelObjectStyle. If that style exists, the script will apply that object style to all the size labels.
Using different units
Now, you would prefer centimeters instead of inches? That’s possible too.
The easiest is to use the sample document that comes with the script.
On your scripts panel, you should see an entry Copy Sample File with Documentation to Desktop.jsx
Double-click it to open the sample document.
On the pasteboard of that document, you should find are three frames. Two large ones and a small one.
One is a text frame with explanatory text, the second is a frame that lists the configuration settings for the SizeLabels script, and the third is a small ‘template’ for the SizeLabel frames.
The easiest way to set up your own documents, is to simply copy the frame with configuration data as well as the template SizeLabel frame, and paste both of them onto the pasteboard of your own document.
Then tweak the config data, the paragraph style and the object style as desired.
Configuration
You can change the behavior of the script by modifying the configuration data in the text frame on the pasteboard.
INI configuration frame
The format is pretty self-explanatory; skip over this section if too much info.
The detailed TL;DR information for the formatting rules:
The text frame is formatted in a format similar to the old-style Windows INI format, with some additional flexibility built-in.
The advantages of this approach is that each document can ‘carry’ its own configuration and the configuration is plain for everyone to see, in a human-readable form, rather than being hidden away on some preferences dialog.
- The information is spread over multiple paragraphs or lines.
- There are two types of relevant lines:
[SECTION]
orname=value
. Any lines that do not consist of either a name in square brackets or a name, an equal sign and a value are ignored. - The information within the square brackets (the
SECTION
) or information to the left of the equal signs should not be edited (thename
). - The
name
to the left of the=
are case-insensitive and only lettersa-z
and digits0-9
are taken into account. Names likeabc
,a B c
, orA'b'c
are all interpreted as the same thing –abc
- The information to the right of the equal signs can be freely edited
- By default, leading and trailing spaces are ignored.
someData =some Value someData= some Value someData = some Value
are all equivalent – they all mean
someData="some Value"
- Quotes can be used to express leading or trailing spaces. Curly quotes are seen as equivalent to regular quotes.
someData = " some Value " someData= “ some Value ”
both indicate that
someData=" some Value "
including the leading and trailing spaces. - Numeric values can have units and the script will auto-convert between units as needed. If the horizontal unit is
cm
and the label frame width is written as1 inch
, the width will automatically be interpreted as2.54 cm
Description of the options
horizontal unit
(Standard Feature). This is the unit to be used for the frame width info. If the frame is 1"
wide, and the horizontal unit is cm
then the value shown will be 2.54
vertical unit
(Standard Feature). This is the unit to be used for the frame height info. If the frame is 0.25"
wide, and the vertical unit is point
then the value shown will be 18
label frame width
(Standard Feature). The fixed width of each label frame. This value can have a unit. If no unit is present, then the value is assumed to be in horizontal unit
label frame height
(Standard Feature). The fixed height of each label frame. This value can have a unit. If no unit is present, then the value is assumed to be in vertical unit
dont label frames below width
(Standard Feature). The minimum width a frame needs to have before it can get a size label. If no unit is present, then the value is assumed to be in horizontal unit
dont label frames below height
(Standard Feature). The minimum height a frame needs to have before it can get a size label. If no unit is present, then the value is assumed to be in vertical unit
add image filename to label
(Standard Feature). A yes/no value. If this is set to yes, any size label for an image frame will also get the image file name, in addition to the frame size.
lock layer
(Pro feature). A yes/no value. If this is set to yes
, the SizeLabels layer will be locked after running the script.
That way, it helps avoid inadvertent use of this layer. You don’t want to add items to it, as the layer is a throw-away layer that can be deleted in order to get rid of all size labels. Locking it avoids accidentally placing items on the layer.
scale
(Pro feature). A floating point number. All frame sizes are multiplied by this number before being added to the size label. This is useful if the layout is scaled down – e.g. if the layout is 1/10th scale, you would set the scale to 10
. A frame that is 1"
on the page would then be labeled as 10"
.
add unit names
(Pro feature). Append the unit names to the sizes on the size label.
override horizontal unit name
(Pro feature). Use this for the horizontal unit name. For example, if you have a layout that is 1/100 scale and a 1 cm
wide frame represents a 1 m
actual size, you could set horizontal unit
to cm
and then also override horizontal unit name
to m
. The 1 cm
frame would then be labelled as being 1 m
wide.
override vertical unit name
(Pro feature). Use this for the vertical unit name. For example, if you have a layout that is 1/100 scale and a 1 cm
high frame represents a 1 m
actual size, you could set vertical unit
to cm
and then also override vertical unit name
to m
. The 1 cm
frame would then be labelled as being 1 m
high.
prefix horizontal with
(Pro feature). Add a prefix before the width of the frame. Example: prefix horizontal with = "W="
prefix vertical with
(Pro feature). Add a prefix before the height of the frame. Example: prefix vertical with = "H="
label nested frames
(Pro feature). A yes/no value. Normally, frames that are nested within larger frames are not labelled. By setting this to yes
such frames will be labelled.
omit image frames
(Pro feature). A yes/no value. Don’t label any image frames if this is set to no
.
omit text frames
(Pro feature). A yes/no value. Don’t label any text frames if this is set to no
.
omit other frames
(Pro feature). A yes/no value. Don’t label any frames that are neither text nor image frame if this is set to no
.
ignore frame with script label
(Standard feature) By default, any frame that carries a script label ignore
will not be labelled.
(Pro feature) If you want to use a different string instead of ignore
, you tell SizeLabels what that string is – e.g. ignore frame with script label = nolabel
will not label any frames that carry a script label nolabel
.
round to decimals
(Standard feature) By default, all numerical values are rounded to 2 decimals.
(Pro feature) You can change the rounding by changing this value
swap width and height
(Standard feature) By default, the size label contains height, then width.
(Pro feature) Yes/no value. You can swap things around, and have width, then height.
separator between image name and size
(Standard feature) By default, the image file name is separated from the width and height by -
(Pro feature) You can change the separator string to something else.
separator between width and height
(Standard feature) By default, the height and width are separated by x
(Pro feature) You can change the separator string to something else.
layer name for labels
(Standard feature) By default, the layer that carries the size labels is called SizeLabels
(Pro feature) You can change the name of the layer being added. For example, you could run the script, then change some settings and change the layer name, and run the script again to add a second layer.
apply label style name
(Standard feature) By default, the paragraph style SizeLabelStyle
, if present, will be applied to the content of the size labels.
(Pro feature) You can change the name of the style to be applied on the next script run.
apply label style name
(Standard feature) By default, the object style SizeLabelObjectStyle
, if present, will be applied to the size labels.
(Pro feature) You can change the name of the object style to be applied on the next script run.
Version history
Version 1.0.9: June 26, 2024
– Updated to CRDT_ES 0.1.2
Version 1.0.8: June 15, 2024
– Make action undo-able
Version 1.0.7: June 10, 2024
– Updated to CRDT_ES 0.1.1
Version 1.0.6: May 30, 2024
– Updated to CRDT_ES 0.1.0
Version 1.0.5: May 26, 2024
– Updated to CRDT_ES 0.0.8
Version 1.0.4: April 25, 2024
– Small bug fixes
Version 1.0.3: March 30, 2024
– Small bug fixes
Version 1.0.2: March 26, 2024
– Small bug fixes, first public release of the rewrite
Version 1.0.1: March 20, 2024
– Rewrote script using CRDT_ES
– Moved configuration into pasteboard frame
– Added a bunch of new features: custom units, properly handle picas and ciceros…
Version 0.0.4: July 25th, 2012:
– Added support for EPS files
Version 0.0.3: July 24th, 2012:
– Added option to include image file name in labels.
– Fixed possible conflict with a character style inadvertently overriding the SizeLabelStyle.
– Made label separators configurable (default separators are ” – ” and ” x “, e.g. “MyImage.jpg – 12.02 x 4.23”)
Version 0.0.2: June 23rd, 2012:
– Version 0.0.1 did not handle anchored or inline frames correctly. Now fixed.
Version 0.0.1: June 3rd, 2012:
– Initial release