Export book documents to individual PDF files

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.


The script displays this dialog:

Export individual PDFs

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.

Version history

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.

Useful script? Saved you lots of time?

Consider making a donation. To make a donation, please press the button below. This is Paypal's payment system; you don't need a Paypal account to use it: you can use several types/brands of credit and debit card.

Peter Kahrel's paypal account

Show script (right click, Save Link/Target As to download)

Questions, comments? Get in touch