PDF Place and Export
Latest update 9/11/2019, version 2.2.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
Instructions for use
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 of the same page size. 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 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.
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.
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, which then updates the current options. 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.
The script provides default saved settings named [Default]. These settings cannot be deleted but may be updated to any desired values by saving settings and providing the name [Default], which then overwrites the default settings.
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.
Version 2.2.1 (190911)
- Update progress window in message function.
Version 2.2 (190909)
- Restore measurement units.
- Fix flaw when combining folder of PDFs with option include bleed.
Version 2.1 (190902)
Version 2.0 (190624)
- Revise settings.
- Restore altered app preferences on completion.
Version 19.4.13 (1.12.1)
- Fix progress not updating when exporting PDF.
- Progress steps to correct number 3 not 4.
Version 19.3.8 (1.12)
- Add license.
Version 19.3.1 (1.11.1)
- Cancel button click handler wrap in function.
Version 19.2.24 (1.11)
- Update settings file error handling.
- Document margins set to zero, single column.
- Change max bleed from inches to points to avoid inch vs mm problem.
- Change ruler preferences from inches to points.
- Max bleed value restrict to numeric only.
- Max bleed blank becomes "0".
Version 19.2.21 (1.10.1)
Version 19.2.12 (1.10)
- Add File.decode() to PDF file name replace confirm.
- Remove try/catch during PDF export. Let throw to higher try/catch.
Version 18.12.9 (1.9)
- Fix typo "error has occured."
- Settings file named by title instead of app.activeScript.
- Revise settings object.
- Input max bleed missing call changeOption().
- Revise listSettings object, add settings.lock property.
Version 18.11.12 (1.8)
- Store settings in user data folder.
Version 18.9.26 (1.7.2)
Version 18.9.23 (1.7.1)
- Fix flaw, delete setting confirmation removes setting from UI when responding 'no.'
Version 18.8.19 (1.7)
- Revise settings object.
- Remove obsolete function settings restoreLast.
- Add function configureUi.
- Wrap work in process function, wrapped in try/catch.
Version 18.5.21 (1.6)
- No longer output failed document when other documents are open.
- Revise PDF place pages program logic.
- Documents in spreads that contain a single page midway no longer halt placing pages.
- Properly handle reader spreads when page 1 is a spread rather than single page cover.
- Add option to limit bleed.
- Spine effect master pages set margins to zero.
Version 18.5.20 (1.5)
- Revise progress bar.
- Remove close button from progress bar.
Version 18.5.1 (1.4)
- Catch processing errors and alert user.
- Fix unhandled exception when combining PDFs and include bleeds, but a page lacks bleed.
- No longer close document on PDF box error.
Version 18.4.30 (1.3)
- Original Name +, replace illegal characters and alert user.
- Disable option Pages from spreads when processing folder.
- Read legacy settings removed.
Version 17.12.11 (1.2)
- Create saved settings [Default] if it does not exist.
- Create saved settings file if it does not exist.
- Disable delete settings button if none are selected or [Default] is selected.
- Add default PDF Preset, first discovered in list with PDF and X-4 in name.
Version 17.11.16 (1.1)
- Perform Spine effect option only when facing pages enabled.
- If facing pages disabled, remove excess master page.
- Fix unhandled exception when include bleed but PDF has no bleed box.