Introduction
Background
Installation
Work Flow
Layout
Library
Reset
Issues
Release Notes
License
Contact
More Samples

InDesign Photo Book Layout Scripts


Introduction

The tools described here are Adobe InDesign scripts that build a layout of graphic frames for photo placement. I wrote them because of dissatisfaction with the layout tools offered by the photo book printers including WinkFlash and Blurb.

The tools include a number of features to meet the needs of photo book layout:

The screen shots below show a couple of layouts made with the tools. More follow at the end of this page.

2x2
1x3 vertical split-pane, full area

split pane
2x2 landscape aspect

Background

When I first tried to put together a photo book using InDesign I quickly got bogged down computing the sizes of the the frames for various layouts and page sizes. While the computation for any one is simple, in the aggregate it got stale fast and I quickly abandoned this approach. I next set up an Excel spreadsheet to do the computation. That solved one problem but I still had to draw the layout, apply the computed dimensions, and use InDesign to distribute and align the frames. That's a lot of work to repeat with each new page size or to explore a new layout. It was about this time that I became aware of the scripting facilities in InDesign and so tried a third approach that led to the scripts presented here. I had some JavaScript experience in my prior life and so chose that for the scripting language.

I was guided by a several goals in developing these scripts.


Installation

Download the tools:

Download the files and save in the following folder:

Where InDesign_Install_Folder is the location where you installed InDesign. On Windows systems, unless you gave an alternate location, this is probably:
C:\Program Files\Adobe\Adobe InDesign CC
or something similar for earlier versions of InDesign.

On CS2 insert two forward slashes in front of the second line in the script. (It's not worth maintaining two versions of the scripts that differ by only two characters in one line for the purpose of supporting an ancient version of InDesign.) Using Notepad or another text editor change:

#targetengine "PhotoBookLayout"
to:
//#targetengine "PhotoBookLayout"

By placing the scripts in the folder as described above it will appear "Application" section of the scripts window. Alternatively, you can save it in another location to cause it to appear in the "User" section of the script window. Right-click on the "User" section and select "Reveal in Explorer" to obtain the location.

ScriptsMenu

InDesign Version Compatibility

The scripts should work fine on Windows and Mac versions of InDesign from CS2 on.

I developed the scripts primarily on the Windows version of CS3 with only brief testing to establish overall compatibility on CS2, CS5, CS5.5, and CC. Others report that they work fine on CS6 and on a Mac. I'd appreciate confirmation that they work with CS4.

Menu-value persistence only works on CS3 and later. That is, the values you entered in a menu are remembered and presented the next time the menu is displayed. This is not possible on CS2.

Adobe documentation nonwithstanding, CS5 and CS5.5 does not appear to have a Fitting on Empty Frame option. This option, working in CS2, CS3, and CC, makes it possible to specify fitting options for an empty frame and is used by these scripts to automatically specify Fill Frame Proportionally. As a result, you should set the Fill Frame Proportionally option manually after you create a new document:

Object->Fitting->Frame Fitting Options...->Content Fitting->Fill Frame Proportionally

The option is associated with the document and remembered across InDesign sessions.


Work Flow

Photo Book Creation

If your photo book printer accepts PDF files you can create PDF files directly from InDesign.

If your photo book printer does NOT accept PDF files, as is the case for WinkFlash at the time of this writing, then you must create a JPG image of each page set as a full bleed. InDesign CS3 and CS5 can export JPG files of arbitrary resolution.

Enter the resolution recommended by your book printer in the JPEG dialog box. This will create one JPG image per page with a name containing the page number.

InDesign CS2 can export JPG files in only one resolution, which is intended only for proofing and is far too low for book printing. With CS2 you need to export your document as a PDF file and then convert the PDF to JPG pages with another tool such as Adobe Acrobat.

To set up a full bleed obtain the full bleed and cut page dimensions from your photo book printer. For example, a WinkFlash 10x8 book has a full bleed size of 11.5" x 8.5" and a cut page size of 11.3" x 8.3". In the InDesign New Document dialog set the Page Size to the cut page size and set the Bleed (Top, Bottom, Inside, Outside) to half the difference between the full bleed size and the cut page size, .1" for this example (half to distribute the bleed evenly).

The frames created by both tools have the Frame Fitting Options set to Alignment to Center and Fill Frame Proportionally. I find that this is most sensible for my needs.

Script Access

The figure below shows the entry for these scripts in the scripts window.

ScriptsMenu

Library Access

A Note of Caution

These scripts are designed to work with any page geometry whether it is landscape, square, or portrait. A layout that may look fine in a landscape format page, say one row by three columns, will look pretty bizarre when set on a portrait format page. Just because the scripts can generate a particular layout does not mean that it is a good layout. There probably is a place for a 1"x 5" photo but it's quite rare; a full page of them is even more rare.


Photobook_Layout.jsx

This script builds a layout according to parameters given by the user in the menu. The layout is built within the margins of the current page or within an arbitrary rectangle if one is selected, both possibly reduced by a given scale factor. Use a rectangle to build a layout across multiple pages in a spread. The layout uses the maximum available space subject to the constraints of the selected scale, aspect ratio, bleed and gap. Multiple frames in a layout are arranged in a group so that you can reposition them as an aggregate.

Double click on the Photobook_Layout.jsx script in the InDesign Scripts panel to bring up the layout dialog.

Layout Menu

Photobook_Library.jsx

This script builds an InDesign library consisting of one or more layouts. The layout is built within the margins of the current page, which should be constant throughout the document for the library to be useful. Each layout includes a frame of the size of the page plus bleed. Align this frame with the edges of the bleed when you drag the library item from the menu onto the page. This frame is on the bottom of the stacking order, is necessary to preserve the alignment of frames on the page, and can be used as a frame to receive a background image.

This script does not yet support the bleed options in the layout script.

Double click on the Photobook_Library.jsx script in the InDesign Scripts panel to bring up a file-selection dialog and then the layout dialog.

Library Menu

By default the script builds multiple single pane and split pane layouts, and one full bleed layout, all centered. Un-check options to restrict the library from the default. The Gap, Caption, Scale, Near margin and Alignment options are the same as described above.

For the single-pane case the script builds a layout for all combinations of the selected options.

For the split-pane case the larger pane (or one of the equal panes) always contains a 1x1 layout, the smaller pane (or other one of the equal panes) contains a 1xN layout where N is given by the Max rows or cols option. All split-pane layouts include only the Full cell shape because, in the general case, the others will not produce alignment to the margins in both frames. Layouts containing cells with a landscape aspect ratio less than Min land or a portrait aspect ratio greater than Max port are silently discarded. Use this to suppress unusable layouts that may result as the options are traversed.

Remember the Curse of Dimensionality. The number of layouts built expands exponentially with the options checked. It is all too easy to build a library with such a large number of similar layouts as to render it totally useless (and take a long time to build). Limit shape, alignments, etc. to one or two until you know what you are doing and have a compelling reason for doing it.

Note: There appears to be a bug in InDesign whereby the library window is sometimes not refreshed after the script completes. If the layouts do not appear in the library refresh the window by resizing it.

The following figures show a number of libraries built with with this tool.

Library
Single-Pane, Dual-Pane, and Bleed with default options

Library
Dual-Pane, Max rows, cols of 3

Library
Single-Pane, Max 3x3, full, landscape, portrait, & square

Library
Landscape shape, Max 1x1, reduced scale, near alignments

Library
Square shape, Max 1x3, reduced scale, center alignment

Photobook_Reset.jsx

This script silently sets the dialog options for the layout and library script to default values. Only meaningful on CS3 and later since option values are not remembered on CS2.


Issues

I'm not happy with the appearance of the dialog boxes and hope to migrate to ScriptUI eventually.


Release Notes

Current Release - 1.0.9 - 14 Jan 2013

The new features added with the 1.0.8 release (generalized bleeds and two-column menus) were included only with scripts with _exp in the names: Photobook_Layout_exp.jsx and Photobook_Library_exp.jsx to give an opportunity for testing. With the 1.0.9 release these features are now in the scripts with the original names: Photobook_Layout.jsx and Photobook_Library.jsx and the scripts with the _exp have been removed.

The C-circle copyright symbol in the comments of the scripts (ASCII 0xA9) caused an error when the script was run by a user in China. The character was removed to avoid future problems.

All Releases


License

You may execute these scripts for any purpose - commercial or personal - free of charge. I have benefited greatly from free software. I offer this back to the community as a way of saying thanks.

You may not redistribute these scripts without permission, in writing, from me.

If you are a photo-book printer and would like to offer these scripts to your users, please contact me to discuss licensing.


Contact

Please let me know if you find any bugs or have suggestions for improvement. I would also appreciate a note if you found the scripts useful. (Address is in an image to reduce spam.)

email


More Samples

Sample
3x3 portrait aspect

Sample
3x1 horizontal split-pane, full area

Sample
1x1, 65% scale factor, near right, near bottom alignment

Sample
2x3 square

Sample
1x3 square, centered, 80% scale, fixed gap

Sample
Full bleed with 4x1 square overlay

Sample
1x2, full area

Sample
2x1 horizontal split-pane, full area, with captions

Sample
Composite of two bleeds. Align left, bleed top left bottom, scale 100% full;
3x1 align right bleed top right bottom scale 100%, shape full.

Sample
Align bottom right, bleed bottom right, 80% scale, shape landscape

Sample
Align right center, bleed right, 80% scale, shape full

Sample
1x4, align bottom, bleed left, bottom, right, 100% scale, shape square

Copyright 2010 - All rights reserved.

Page last revised 14 Jan 2014