Export Book Documents to Individual PDF Files
"Export book to PDF" in the book panel's flyout always creates a single PDF file. The script exports all documents in a book to separate PDFs. You can opt to...
This script is part of the Output and Prepress Tools collection. See the full collection here.ย
This script is part of the Book Panel collection. See the full collection here.ย
This standalone script also works with the Book Panel Extras interface.
In InDesign’s Book panel, if you selectย Export Book to PDFย from the panel’s flyout, InDesign creates a single PDF file, either of the documents selected in the panel or of all documents when no documents are selected. No matter what you select, the result is always a single PDF file.
The script described on this page enables the export to PDF of the individual book chapters. It offers two more export modes: export each page of the selected chapters as a separate PDF file and export the selected chapters by section. When exporting by section you can opt to include the section markers or the section prefixes in the file names. Page ranges are always included in section export since the same section marker/prefix can be used in more than one section.
Use
The script displays this dialog:

Select the files you want to export and the preset you want to use, select one of the three export modes (see below). Then select the folder where the PDF files should be placed. Press OK to export the selected documents.
PDF type
Select Print PDF or Interactive PDF. Note that interactive PDF export doesn’t use export presets, and when you select it the PDF preset dropdown is disabled. You’ll have to prime InDesign to use the export preference you want to use: before running the script, open a document and export it to PDF using the options you want to use. Close the document. From now on all interactive PDF export actions use those settings.
As whole documents
Each book chapter is exported as a separate PDF file.
Individual pages
The selected documents are exported page by page. PDF file names are constructed by adding the page number to the document’s name.
First folio in each document is 1
Check this option so that each PDF’s start page number is 1. The InDesign documents aren’t saved, so this affects the PDFs only. Naturally, you can use this option only if all documents start on a right-hand page.
Export individual sections
The selected documents are exported section by section. With Use section markers in the file names checked, the script constructs PDF file names by adding the contents of the section markers to the document names (section markers are set in the Numbering and Section Options dialog in InDesign). The same can be done with section prefixes.
If you opt not to use section markers/prefixes, or if the section marker/prefix contains no text, then the script adds the sections’s page range to the file name, as in reviews_123-126.pdf.
To have each produced PDF file loaded in Acrobat Reader separately, check check View PDF after exporting.
Display problems
On some monitors the list box is too tall and causes part of the script’s window to disappear off the screen. To fix this, open the script in a plain-text editor and look for this line:
list.maximumSize.height = w.maximumSize.height-600;
and change 600 to a higher value, e.g. 1400. If that doesn’t work well, try another value. Make sure you save the script as a text file.
Version history
19 June 2024: Changed the script window’s layout so that the list box has more space. Added a note on how to fix a display problem.
10 June 2022: The script added page ranges to the PDF file names when you export sections and selected to use section markers or prefixes. Removed that.
23 Nov. 2021: Long books caused the script’s window to extend beyond the screen. Fixed.
21 June 2020: Added support for interactive PDF export.
22 Sept. 2019: Added the option to export each document such that its first folio is 1. This does not affect the InDesign documents, only the printed PDFs. This option is available only when you export whole documents.
25 Nov. 2018: (1) In CC2018 something was changed in the way scripts export page ranges; the script needed an upgrade for this; (2) added an option to include section prefixes.
29 Oct. 2012: Added the possibility to select an output folder for the PDF files.
2 October 2011: Added the option to export documents section by section.
13 July 2011: the script can now be used to export documents page by page. File names are now displayed neater (accents and spaces are displayed better).
27 November 2010: Fixed problem with file names.
7 Oct 2010: changed the progress indicator.
15 July 2010: Added checkbox to enable/disable PDF viewing after export.
Peter Kahrel Script Repository
Hosted as a community service, and with deep appreciation, by CreativePro.com
Scripts by Topic | Script Index
Basic Script Installation and Use
How to Modify or Configure These Scripts
Resources for Scripting and Publishing Automation
About This Repository
Contact Peter Kahrel
Note to users: You run scripts at your own risk: CreativePro and the author accept no liability for anything that may be caused by any of these scripts. Always take the necessary precautions. We encourage you to save backups and test scripts on copies of your documents.
This article was last modified on August 22, 2026
This article was first published on January 29, 2026
Commenting is easier and faster when you're logged in!
Recommended for you
Text Styles in Text Variables
Text variables strip styling (italic, bold) and automatic paragraph numbering. T...
Composite Fonts
Unlock the functionality of the InDesign CJK (Chinese/Japanese/Korean) version t...
Using the Book Panel in InDesign
Learn how to use the Book panel to make any long-document project more manageabl...
