Script for saving layouts
This script can merge all elements into a single layer, rasterize, convert fonts to curves, replicate price groups and save files for editing, printing, publishing and previewing. You can learn more about file types in the "Saving layouts for replication" guide.
As a result, the script saves layouts of different types and creates folders for them:
- Edit: a file with .ai extension, where you can edit individual elements.
- Preview: a file with .jpg extension for previewing printed formats.
- Print: a print version with a .tif extension. If there are price groups in the layout, the script will create a separate folder for each of them.
- Publish: a file with .jpg extension for digital advertising, social networks and screens in the restaurants. If there are price groups in the layout, the script will create a separate folder for each of them.
The script is suitable for print and digital layouts with or without price groups. It will work best for our layout templates with properly organized layers, set up guides, and that also have logos, legal information and trim allowances.
- Guidelines: a layer with guides. Do not add anything into it.
- Text: a layer for text. Headlines, sublines, placeholders, price tags. Any text except legal information.
- Price Group: layer for price groups. It is optional, we only make it if we need to place price tags for different price groups on the layout. Normally, separate groups for each price tag are formed inside the layer: Group 0, Group 1 and so on. In this case, prices are not placed in the Text layer.
- Footer: a layer for legal information, logos and footers.
- Background: contains just one element, Clipping Mask with all background objects inside it. We place photos of products in this layer: it can be a linked PSD file or separate elements from which the background is assembled.
How to use Dodo Layout Script
Make sure the layout is saved according to the rules; otherwise errors will keep popping up in the process of running the script. Follow the steps below.
-
Prepare the layout for running the script
The script will only run if the layout is prepared according to these rules:
- The layout is saved in the [Process] folder which is highlighted with square brackets.
- The file name specifies the media type and size.
- All objects in the layout are arranged in four layers: Guidelines, Text, Footer, and Background. If there are price groups in the layout, they are allocated to an additional fifth layer, Price Group, where each price tag stays in a separate group: Group 0, Group 1 and so on.
- All images that are linked to the layout (Linked files), as well as objects (shadows, effects, text) remain editable.
- If the layout is printed, the Bleeds are set, and they are all the same size. If the Bleeds are different, the script will indicate an error.
- If the layout is printed, the Preset to save PDF is set.
- The file is saved. If you have not saved the file, the script will indicate an error.
-
Open the script in Adobe Illustrator
Use one of these three methods:
- Drag-and-drop. Open the layout in Adobe Illustrator, locate the script on your computer, and drag it onto the layout. Confirm that the DodoLayoutScript.jsx script is running.
- Menu. Open the layout in Adobe Illustrator. Go to File - Scripts - Other Scripts. Select the DodoLayoutScript.jsx script in the menu box that appears.
- Hotkeys. Open the layout in Adobe Illustrator. Use hotkeys: for macOS - "Command + F12"; or for Windows - "Control + F12". A dialog box will appear: select the DodoLayoutScript.jsx script.
-
Confirm the media format
After you have opened the script in Adobe Illustrator, a dialog box appears with a choice of file type. The list includes print and digital formats. The script automatically detects the file type by name. Make sure that the format is selected correctly.
If the media type and size are not specified in the file name, the script will not detect the file format and you will have to manually select it from the list in the dialog box.
You can disable font conversion to curves in the same menu; this option is enabled by default. The script converts all fonts except Dodo Rounded v2 and Dodo Rounded Black to curves.
If all parameters are correct, confirm the script by clicking the "Run" button.
-
Confirm overwriting the files
If the script detects previously created files, it will warn about possible overwriting and ask to confirm it. If you do not want to overwrite files, you can stop the script from executing.
-
Wait for the script fulfillment
You have now selected the layout type and confirmed that the price groups have been saved. The script will then start running and a progress bar will appear on the screen. While the script is running, do not switch between windows and avoid using other programs.
When the script finishes replicating the layout, it will report that the files have been successfully saved.
-
Check the files
We are still in the process of the script testing, so errors may occur every now and then. The designer is the one in charge of the final result. After using the script, do check all the files. Make sure the layouts are in the proper folders, have the correct names, and the design has not been damaged in the replication process.
Possible errors
A list of errors that may occur while running Dodo Layout Script, along with instructions on how to fix them.
-
"The document must be saved before running the script"
Save the file before running the script, otherwise the script will not start.
-
"The background layer must contain 1 element"
The error appears when the script detects more than one element in the Background layer. For the script to work correctly, the layout background must include only the Clipping mask with objects inside it.
-
"The file to be printed must have bleeds"
This error appears if no Bleeds are set in the printed layout or their sizes are different. Go to File -> Document Setup and assign bleeds.
-
Unknown error
If the script generates an error that is not on this list, save the error message, package the Process file design (File → Package) and send it to the developer for checking.
Questions, bugs and feedback are collected via the feedback form. Share your feedback and we will work the script out.