PDF Place And Export
Script for Adobe InDesign
Latest update 7/11/2021, version 3.3.1
The script places PDF pages into an InDesign document, arranges the pages for a specific result, and exports a new PDF. The script began as a means to create PDF proofs in spreads from print-ready pages, ensuring the proofs are children of the files that go to press. From there more features were added. One notable feature is to “unspread” printer spreads or reader spreads, converting either back to single pages.
- Process a single PDF or an entire folder of PDFs
- Creates an InDesign document sized to match input PDF
- Option to include bleed
- If facing pages, resolves overlapping bleeds in the spine
- Convert a PDF in reader spreads back to single pages
- Convert a PDF in printer spreads back to single pages
- Create printer spreads
- Option to add spine effect
- Export a new PDF using any PDF preset
- Save and restore all settings
- User-configurable localization
How to use the script
The interface has four sections: Process, Layout, Output, and Settings. Enable desired options and click the OK button to begin. A progress bar is displayed while processing.
Section 1: Process
File or Folder — select a single PDF or a folder of PDFs to process. The path and name of the selected file or folder appears to the right of the button. Selecting a file clears any selected folder, and vice-versa. When processing a folder, only files with the .pdf extension are processed.
Combine folder contents into a single document — available when processing a folder. When enabled, rather than generating separate output files for each PDF the folder contains, the PDFs are combined into a single InDesign document and/or are exported to a single PDF. In this case, output files are named to match the selected folder plus the defined suffix (described below), and the output folder defaults to the parent of the selected input folder, rather than the input folder itself (to override, see Output section, Folder option). IMPORTANT NOTE: the InDesign page size is set to the trim size of the first page of the first PDF in the folder of PDFs to combine. Ensure all PDFs to combine share a common trim size.
Section 2: Layout
These choices determine how placed PDF pages are arranged in the InDesign document. An existing document is not required beforehand. The script reads the trim box of the PDF and creates a new document based on the page size discovered. If the PDF lacks a trim box, the script presents a warning and attempts to read the crop box or media box instead, if the user chooses to continue.
Include bleed — when placing PDF pages, the bleed box is read, the document bleed is set to match, and pages placed include bleed. If a PDF page lacks a bleed box, the script presents a warning and processing of that file halts. If processing a folder, the user may choose to continue with the next file. For each file processed, if Facing pages is enabled, the overlapping bleeds in the spine are resolved.
Important: bleed is determined by comparing bleed box height against trim box height and calculating a value based on the difference. The script has no means to understand if a PDF page has unequal bleed margins, and so assumes all PDFs to process have equal bleed margins. Use other PDF tools to prepare PDFs for processing as needed to satisfy this assumption.
Limit bleed to — available when the option Include bleed is enabled, this option allows the user to define a maximum bleed value. If the bleed value of placed PDF pages exceeds the defined value, they are cropped to limit bleed. As well, the document bleed is set no greater than this value.
Facing pages — creates a document with facing pages enabled.
Add spine effect — creates a layer and master page labeled Spine effect with two gradient-filled rectangles that give the semblance of a shadow as the pages roll into the spine. Available only when Facing pages is enabled.
Transparent background — places PDF with transparent background option set. Otherwise placed PDFs are opaque.
Pages from spreads — places the PDF pages in the document and then rearranges the pages to “unspread” the pages back to their natural order.
Reader spreads — assumes the first page of the input PDF is a single page (cover) that determines the page size of the document, and that pages to follow are spreads in ascending order. The script tests this assumption by comparing the width of the first and second page of the input PDF. If the sizes match, there is not a single-page cover, and the script acts accordingly. A final single page (back cover) is typical but not required. The PDF is processed correctly in either case.
Printer spreads — assumes the first page of the input PDF is a spread of the last and first pages (back and front cover), and that pages to follow are arranged as printer spreads, increasing low folio pages paired with decreasing high folio pages, until reaching the center at the PDF’s last page. The page size of the document is set to half the width of the spread discovered at page one of the input PDF.
Important: If PDFs to process do not conform to the above assumptions, the final result will not be as expected. Ensure that input PDFs match the assumption for the choice selected, including a bleed box defined when Include bleed is enabled, another assumption of the script. Use other PDF tools to prepare PDFs for processing as needed to satisfy these assumptions.
Create printer spreads — arranges the pages in the order required for a saddle-stitch booklet constructed of 4-page signatures, commonly referred to as printer spreads. This requires the page count be divisible by 4. If not, the user is prompted with an option to add blank pages to the end of the document. When processing is complete, the document is half the number of single pages that are double the width of the trim size, with two PDF pages placed side-by-side as a spread across each document page.
Rotate — available when creating printer spreads. After pages are arranged as printer spreads, odd spreads are rotated clockwise and even spreads are rotated counter-clockwise, orienting the spreads for production on a duplicator or other device that grips the short edge rather than long edge of the sheet.
Section 3: Output
For PDFs processed, the resulting documents may be saved and/or immediately exported to new PDFs using any PDF Preset.
Folder — the folder to which InDesign documents are saved and PDFs are output. Whenever File or Folder is selected in the Process section, this value updates to the folder where the input file is located, or the folder selected to process. When the option Combine folder contents into a single document is enabled, this value updates to the parent of the folder selected to process. To override, click the button and select another folder.
Save .indd — saves an InDesign document named to match the input PDF plus the suffix defined below (Original name +).
Export PDF — requires that a PDF Preset is selected, which is used to export the PDF. The PDF is named to match the input PDF plus the suffix defined below (Original name +).
Original name + — a suffix of characters appended to output file names. The characters chosen must be legal to use in file names. By default, files are output to the same folder as the input files, making a suffix necessary, otherwise output files would overwrite input files. If the output folder differs from the input folder, a suffix is not required as there is no risk of overwriting files, but using a suffix is still encouraged to differentiate output files from their input. If required and no suffix is defined, the default suffix “_out” is appended to output file names.
Replace existing output files — when enabled, existing output files are replaced without user intervention. When disabled, the user is prompted to confirm the replacement of each existing output 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].
Each time processing begins, the current options are preserved, and the next time the script is launched, options are restored to the last values used.
The script provides user-configurable localization. By default the script language is US English, which does not require further download or configuration. For other languages, download the Language Pack and copy the i18n file for the desired language to the script folder alongside the script file. When launched, the script detects the i18n file and the interface displays the language. If the desired language is not present in the language pack, edit the English i18n file to translate to the desired language, and copy the edited i18n file to the script folder alongside the script file. For details of how to edit and install i18n files, read How to Localize Scripts.
PDF Place And Export
License details included in download
For help installing scripts, see How to Install and Use Scripts in Adobe Creative Cloud Applications.
IMPORTANT: by downloading the script you agree that the software is provided without any warranty, express or implied. USE AT YOUR OWN RISK. Always make backups of important data.