Add Barcode

Script for Power Switch 9-10 (attached to an InDesign CS5-5.5 configurator). Version 1.1.

The script creates barcode taking 7 digits from the Argument 1 which is set in the Define single-line text with variables dialog box using the following settings:

Settings in the Properties panel:

The Argument 1 and 2 are used to set horizontal and vertical offset in millimeters for the text frame containing barcode.

If file name contains "_portada", the barcode is created like so:

If file name contains "_paginas", the barcode is created like this:

The script creates a new layer -- "Barcode" -- on top of all other layers and creates a text frame there, fills in the contents and applies the necessary formatting. For barcode lines I used the font called "Free 3 of 9" (FREE3OF9.TTF) and for digits -- "Consolas Regular".

The same script works both when attached to InDesign configurator in Power Switch and when used as a stand alone script in InDesign.

Click here to download.