InDesign User Interface mods with Startup Scripts

In Episode 16 of my Youtube videos, I briefly showed a startup script that added several options to the contextual menu that allowed a frame to fit a given size. But it’s not the only way I’ve modified my user interface, so this episode of “Must-Haves” is dedicated to scripts that make minor modifications to the user interface.

The modifications mentioned in this article use javascripts that are installed into the startup scripts folder. Scripts put into this folder don’t have to be double-clicked from the scripts palette, instead they are run when InDesign starts up. So let’s have a look at what features these scripts add to the user interface.

goawaystartupscreen.jsx

Origin unknown

This is a one-line script that instead of adding functionality, actually takes it away… If you don’t like the startup screen showing up whenever no documents are open, add this script to the startup scripts and you’ll never see it again.

PalettenmenusinsHauptmenu.jsx

By Gerald Singelmann (Cuppascript)

This script adds a new main menu item that shows all panel menu items within the one menu.

TomaxxiLAYERS

by Marijan Tompa (Tomaxxi)

This script adds three options at the bottom of the layers panel that allow a layer set to be applied upon the creation of new documents. The layer sets are also customisable.

BookOpenAll.jsx

By Theunis de Jong (Jongware)

This script adds two options to an InDesign book palette – open all documents and close all documents.

FileCloseAll.js

By Marc Autret, Indiscripts

This script adds an item to the file menu, particularly close all.

AddPathOperationsToLayoutMenu.jsx

By Olav Martin Kvern, Silicon Publishing

This script adds the functionality of the pathfinder palette to the contextual menu. This is a great timesaver when working with shapes, so rather than having to click off of the object or objects being worked on to perform a command, simply right click to call up the desired command.

ConvertSwatchToGrayscale.jsx

By Gabe Harbs, In-Tools

This adds an option to the color palette that allows a color to be converted to greyscale based on formulas in the script.

ControlBackgroundExport.jsx

By Marijan Tompa (Tomaxxi)

This script adds a menu item to Adobe InDesign that allows the export PDF option in the background to be enabled or disabled. For whatever reason, I prefer to watch the progress bar of the PDF being created rather than let the task run in the background, so having this option is useful to me.

Unfortunately, this script is no longer available from Tomaxxi’s website, and it’s also not my script to give away. However, this link is an InDesignSecrets.com article where the script was conceived, and similar scripts are available in the comments section of the article.

SortFilesBeforePlace_startup.jsx

by Roland Dreger, Roland Dreger GrafikDesign

Adds the “Sort and Place…” item under the place item in the file menu. Once items are selected, a UI appears prompting for the method to be sorted for the place.

PlaceByContextv4.jsx

by Gerald Singelmann, Cuppascript

Adds a place… option to the contextual menu… but with a major difference. Selected frames will have the resulting images imported into the frames either in the order they were selected; or if marqueed at once, then from a left-to-right, top to bottom order. It effectively does away with the placegun and allows images to be placed directly into awaiting frames.

SwapImages.jsx

by Gerald Singelmann, Cuppascript

Adds three options towards the bottom of the contextual menu – swap images, swap places, and load image in placecursor. Certainly a go-to script and very handy for swapping images on the same page or spread; or swapping images between frames.

TomaxxiPLACE2

by Marijan Tompa (Tomaxxi)

Adds two options at the bottom of the object styles panel that applies a given object style to placed objects. Typically, object styles can only be applied once images have been placed.

выровнять фрейм.jsx

by Eugenyus Budantsev

Translated as align the frame, this script adds four options to the bottom of the contextual menu that allows a text frame or graphic frame to resize to the margin size, page size, bleed size or baseline. Images within a graphic frame will resize to fit the frame, but this can be adjusted by editing the script and replacing the words:

FitOptions.CONTENT_TO_FRAME

with

FitOptions.CENTER_CONTENT

Or another preferred option. See this link for the other options that can be chosen.

Lastly:

In a future Must-Haves video, I will demonstrate other user interface modifications that can be made that are installed in other ways.

Next Beta Script: Data Merge Cut and Stack Assistant

As a regular user of Data Merge, I often have to assemble projects that require cut and stack impositions. Most of the time, I prepare my files one-up at the correct size and output to PDF, knowing that the RIP of the digital printer has imposition software that has the ability to prepare cut and stack style impositions.

If cut and stack is an unfamiliar term, it is a style of page imposition where the subsequent pages appear on the sheets below until the end of a stack, and then begin again at the top of the sheet in this continuous pattern.

Unlike bookwork that may have a maximum page count of under 1000 pages, cut and stack impositions can deal with page counts in the hundreds of thousands… enough to make any imposition program buckle.

Another way of handling cut and stack impositions is to prepare the imposed base in Adobe InDesign, and then manipulate the data so that rather than being one long list, the list is split into columns based on the amount of pages-to-view on an imposed sheet. This is a quicker method as there are less pages to process and no imposition software to use, but there is the time taken to split the data appropriately, and will suffer any human error that went into manually making the revised database.

Frustrated with this situation, I decided to create a script that would take a large database and repurpose it for a cut and stack imposition. On that note, I present to you my latest script.

UItoexplainlaststacks
The imposed base is created in Adobe InDesign with text frames in place for the data merge placeholders. The script is then run and prompts the user for the original data. An interface appears asking the user for:

  • The records to process;
  • The amount of records in a set;
  • The amount of sets in a stack;
  • How to process last records (in case the stack sizes are uneven); and
  • Any other identifiers visible in the database.

Once OK is clicked, the script creates a duplicate of the original database and arranges the data appropriately, and launches the Data Merge palette so that the imposed base placeholders can be populated.

basewithfieldcodes

If you would like to test this script, please go to the Contact page and in the comment field, ask for the Data Merge Cut and Stack Assistant script.

Updated: Empty Frame Remover 1.1

fixsplash

Released in Christmas 2013, this handy script aimed at being the solution to ridding a document of any empty frames that weren’t required, whether they were empty text frames from stories that had been cut and pasted into InDesign, or empty graphic frames that were no longer required.

Since then, it has come to my attention that the script had two bugs: There was a minor bug that would show an error if there were no text boxes in the active document, and a major bug that would remove frames that despite having no fill/stroke etc, did contain a frame/frames within it (i.e. frames had been placed into another frame using the “paste into” command).

These bugs have now been removed and the latest version of the script can be downloaded from the downloads page. In case it isn’t clear, don’t use the old script anymore – use the latest version!

Please note that the script is still in Beta version and that it is used at one’s own risk.

Feedback on the script would be appreciated. Full details on how the script was created along with contributors details can be found here.

Breaking up is hard to do… InDesign files into individual PDFs that is!

UPDATE 2015/9/8: I have created a solution that will save uniquely-named InDesign or PDFs from a Data Merge. See more about this script here.

Several forums dedicated to InDesign advice have recently been asked the following question: “How to split an InDesign file into single page PDFs”.

Splitting a large PDF into single page PDFs is possible via the extract pages feature of Acrobat 9 and up. The resulting pages are then extracted to the same file location as the original PDF but contains an underscore and page number in the filename.

dm2un1

Splitting a large PDF into fixed page lengths (e.g. singles, doubles etc) is possible via the Split Document feature of Acrobat X and up. This also provides limited control concerning the name and location of the resulting split PDFs, as well as other ways of splitting the PDF (e.g. filesize or bookmarks).

dm2un2

So splitting a large PDF into smaller PDFs is possible via Acrobat. However, the brief was “How to split an InDesign file into single page PDFs”.

By default, there is no way to do this directly from InDesign without a script.

UPDATE 2014/8/24: I have written an article for indesignsecrets.com that demonstrates two possible ways of doing this via InDesign that do not require any scripting, but they are not one-step solutions.

However, there are at least four scriptable solutions available as of this moment:

  1. Scripter Loic Aigon produced a script called Custom Export – an InDesign javascript that behaves in a similar fashion to the Split Document feature of Acrobat, but without leaving InDesign.
  2. (updated 5 November 2013) Scripter Dmitry Lapaev offers three scripted solutions, but of these there are two that will be of most use to those who intend to output to print: the first is Quick Export to Adobe PDF  (see this link here) and the next is Batch Export to PDF (see this link here).
  3. Yet another javascript with a more sophisticated interface is Scott Zanelli’s Page Exporter Utility that had been discussed on this blog before. Read more about the script here.
  4. Fellow wordpresser Macgrunt has also produced an applescript that allows the export of single page PDFs from one InDesign file. While it does not have a user interface, it certainly does the job. Read more about his script here and read his related blog posts concerning renaming of files.

UPDATE 2014/1/18: There are also paid solutions that can accomplish this task. One such solution is PDF Bee by Chris Paveglio. This has not been tested by Colecandoo, nor is this a paid endorsement.

UPDATE 2014/8/1: There is a new standalone application that allows InDesign to reference an Excel file and prepare single record PDFs. This recent application again has not been tested by Colecandoo, nor is this a paid endorsement.

So the question is answered… right? Yes and no. Yes, it is possible to export to individual or smaller page PDFs, but the naming of the files could be better.

Using an example of business cards that have been data-merged to a new InDesign file, the brief is now to produce PDFs with filenames that reflect the names of the people on the business cards. Using the earlier solutions, the files would still need to be renamed afterwards. So how is this done?

SOLUTION ONE: Loic Again!

Loic has another script called PDF Export Cropper. This script is much more flexible than the previous scripts in that files can be split according to more variables, and the file naming is more flexible. To demonstrate, an example single sided business card has been created. The PDFs are to be named based upon the name of the person, so the field that holds the client’s name has been assigned a special paragraph style that is used nowhere else on the card – in this instance, the style “clientname” has been assigned.

dm2un4

The file is then merged to a new InDesign file. Once the new file is created, the PDF Export Cropper script is run.

dm2un5

A new user interface appears. In this example, within the “Choose Identifier” portion of the interface, the appropriate paragraph style has been chosen. The filename is to be the name of the resulting paragraph style, so all that is left to do is click Export.

dm2un6

And voila! The PDFs are split and named based on the client name that appears on the business card.

The only downside – that the cards can only be one page (that is, if the business cards were double-sided, Loic’s script would not work).

UPDATE 2014-01-14: Loic’s scripts are currently being revised and at the time of writing this update are unavailable. See his post here.

SOLUTION TWO: Hans Haesler

German Swiss scripter Hans Haesler has a similar script to Loic’s script. Sadly for me, it is in German, so I can’t understand the user interface that the script creates. A link to the script and a brief how-to-use for Anglophones is available here.

SOLUTION THREE: Via Adobe Acrobat

Unlike the previous two solutions, this solution requires the data merge file to be merged to one large PDF. It also requires that the field from the database that contains the names to become the future filenames is called PartnerHQ_Id. From here, an Acrobat action has to be run. The action is available from here:

UPDATE 2014/7/19: There is an update to this script available from the original forum that discussed the initial solution. The update allows the PDF to be split into files longer than one page in size. See post 11 in that particular forum for the script.

First, the action will have to be loaded by opening Acrobat, select the File Menu, Action Wizard, Edit Actions. From the new window, select Import and then navigate to the downloaded split files.sequ file.

dm2un6a

Next, create a new folder and copy the PDF to merge and the csv or txt file that was used for the data merge into that folder.

dm2un7

Once this is done, open the PDF to be split using Adobe Acrobat and from the File Menu, select Action Wizard, split file

dm2un8

A new window will open, and the file that is already opened should be listed in the window. Click Next.

dm2un9

The actual javascript to be run will open as a window. Click OK.

dm2un10

At this stage, the script presents an error. Click Close.

dm2un11

Voila! The PDFs are renamed based on the client names. The folder also contains the original PDF and the database files.

dm2un12

So there are at least three solutions to this brief.

%d bloggers like this: