Save Named PDF
Script for Adobe Illustrator
Latest update 1/14/2023, version 2.3
Save the current document as PDF using variable placeholders to name the output files.
- Save artboards as separate PDFs
- Variables for artboard width and height
- Variables for date, time, and more
- Save using any PDF preset
How to use the script
The interface has four sections: File name, Options, Output, and Settings. Set the desired options and click the OK button to begin.
Section 1: File name
Enter literal text or any variables. To the right is a button that open another window with the file name input repeated, plus a list of variables that may be added to it.
^F — the document file name without extension.
^O — the name of the folder where the document is located.
^A — the artboard number in the sequence of all artboards, beginning at artboard 1. When the option Use artboards is disabled, all artboards are saved to a single PDF and this variable resolves to "1".
^AN — the artboard name. When the option Use artboards is disabled, all artboards are saved to a single PDF and this variable resolves to name of the first artboard.
^W — width of the artboard. When the option Use artboards is enabled, this variable resolves to each artboard’s width. When Use artboards is disabled, all artboards are saved to a single PDF and this variable resolves to the width of the first artboard.
^H — height of the artboard. When the option Use artboards is enabled, this variable resolves to each artboard’s height. When Use artboards is disabled, all artboards are saved to a single PDF and this variable resolves to the height of the first artboard.
^U — the artboard size measurement unit, set below.
^X — the artboard size scale, set below.
^D — date as year (four digits), month, and day.
^d — date as year (two digits), month, and day.
^T — time as hours, minutes, and seconds.
^t — time as hours and minutes.
Date and time are calculated when saving begins so that all files output share the same value, rather than the increasing value of the precise moment each PDF is saved.
The remainder of the window are options related to the variables.
Artboard size measurement units — applies to the variables ^W and ^H. And for the variable ^U, the matching abbreviation (in, mm, pt, etc.) is inserted.
Artboard size scale — for documents not built to actual size. The value entered is a multiplier that alters the result of the variables ^W and ^H.
Numbering minimum digits — for the variable ^A, the result is padded with zeros to become at least this number of digits.
Section 2: Options
Periods — when enabled, periods within the file name are either removed, converted to a dash, or converted to an underscore. This does not include the period before the extension, which is never removed or replaced.
Spaces — when enabled, spaces within the file name are either removed, converted to a dash, or converted to an underscore.
Letter case — when enabled, the file name is converted to either all lowercase or all uppercase.
Remove diacritics — characters with diacritics, such as accents, are converted to the equivalent basic glyph.
Section 3: Output
Folder — the folder to which PDFs are saved. The default is the folder where the Illustrator document is located. Click the button Folder to select another. To the right is a button with three dots that opens another window with more output folder options.
Here, recent folders are listed. Click one, and it becomes the output folder.
It’s also possible to set a folder as the default each time the script runs. Below the list is Default output folder. Click the button Set default, and choose the desired folder. Then whenever the script runs, the output folder is the same. Or leave the default (none), and it’s always where the document is located.
PDF preset — the PDF preset used when saving PDFs.
Use artboards — enable to save each artboard as a separate PDF. Choose all artboards or a range. When disabled, all artboards are saved to a single PDF. For documents of a single artboard, this option is disabled.
Replace existing output files — when enabled, existing output files are replaced. When disabled and an existing file is detected, an incremental number is added to the file name to prevent overwriting the existing file.
Section 4: Settings
The current options may be saved and restored later. Select from the Load drop-down list to choose saved settings, and the current options are updated. Click the Delete button, and the saved settings selected in the Load drop-down list are permanently removed. Click the Save button, provide a name for the settings, and the current options are preserved. If the name already exists, the user may choose to replace the saved settings. Or click the checkbox Replace settings, and choose the settings to replace.
The script provides default saved settings named [Default]. These settings cannot be deleted but may be updated to the current values. Save settings, click the checkbox Replace settings, and choose [Default].
When settings are saved, there is also the option to include Output folder.
Each time the script is launched, the output folder defaults to the location of the Illustrator document. To override the default, enable the option to include Output folder. Then when the saved settings are loaded, the output folder is restored to the value set when the settings were saved. This includes the next launch of the script, as the last settings selected are also restored.
Save Named PDF
For help installing scripts, see How to Install and Use Scripts in Adobe Creative Cloud Applications.
Custom solutions based on any script, or completely new ideas, are possible at reasonable cost. Contact William for more information.
IMPORTANT: by downloading any of the scripts on this page you agree that the software is provided without any warranty, express or implied. USE AT YOUR OWN RISK. Always make backups of important data.
IMPORTANT: fees paid for products purchased from this site, or for programming custom solutions, are the purchase of a non-exclusive license to use the software and do not grant the purchaser any degree of ownership of the software. Author of the intellectual property and copyright holder William Campbell retains 100% ownership of all code used in all products and custom solutions.
IMPORTANT: scripts are developed for the latest Adobe Creative Cloud applications. Many scripts work in CC 2018 and later, even some as far back as CS6, but may not perform as expected, or run at all, when used in versions prior to 2018. Photoshop features Select Subject and Preserve Details 2.0 definitely fail prior to CC 2018 (version 19) as the features do not exist in earlier versions. For best results use the latest versions of Adobe Creative Cloud applications.