Table of Contents

PDF Export

In a production environment, you want to quickly export PDF files of single artboards or entire documents without having your document renamed. This script lets you export to PDF using presets, and intelligently name the exported file using the original linked file name, the document color mode, the artboard name and the PDF preset name used and more.

PDF Options

Artboard Range

Select the pages to be exported.

Additional Marks

Add an additional confidence strip to check for consistent printing.

The artwork scale setting only affects the scale of the marks, it does not scale the PDF file.

Save To

Choose a Location where to save your PDF

Javascript

You can run Extendscript (Illustrator's built-in version of Javascript) to modify the file and path. Your code will be wrapped in a function, so ensure that you include a return statement with the required data structure.

Variables passed your code

Functions

Example


// This example will extract the ID number from a filename and 
// save the  PDF to a master folder based on the ID in the X: drive
// "Example filename "Customer F123246 Test File.pdf"

// Get the current document filename
var docName = getData('doc.filename');

// Use a Regular Expression to get the ID
var matches = docName.match(/F(\d+)/);
if (matches) {
  setPath('X:/' + matches[1] + '/');
  return [];
}

return 'Can not find a valid ID in the filename';


Filename

You can setup the filename template, and the values in the template will be replaced as the PDF file is exported.

{Variable}Description**Example Output*
timestampTimestamp 2024-02-03 14:33:12
timeTime HH:MM:SS14:33:12
weekdayWeekdayMonday
shortweekdayShort WeekdayMon
dayDay3
monthMonth7
yearYear2024
linked.filenameFilename of First Linked File*Empty if none found
pdf.presetPDF Preset Name
artboard.widthArtboard Width in document units
artboard.heightArtboard Height in document units
artboard.numberArtboard Page Number
artboard.nameThe first Artboard Name in the range
artboard.countTotal Artboard Count
export.numberCurrent count of pages being exported
export.countTotal Number of pages being exported
doc.rulerunitsRuler Unitsmm
doc.colorSpaceDocument Color SpaceRGB
doc.filenameDocument filenameexample.ai
?QuestionUses the text to ask a question {?Customer Name} will prompt for “Customer Name”

History

The script will save the last 100 items exported to a history list, you can view the exported files, copy the filename or full filename with paths, and open the file (double click on the filename) or open the folder

Release Notes

2.3.3

2.1.0

2.0.2

2.0.1

2.0.0