There are cases when you need to export sliced PDFs from InDesign. Say you are working on a "WHO is WHO" project and your final document contains 100 pages. But fact is there are 2 pages per person, and that is basically 50 persons. So eventually, you need 50 pdfs nicely named and of course, it will be time consuming and error prone to do it manually. What about using a script?
For this kind of tasks, script come in handy. PDFKeyExporter proves it. Once your document is done, run the script. A dialog pops up and you are now able to configure how your PDFs will be sliced and named. You only need to let the script know which key you are going to use.
The dialog is made of several sections:
- The key to use
- PDF preset to use
- Location where to export the file
- Naming of the file
- Other options
The script needs to know what will be the key element to decide where to slice your file and produce the appropriate PDFs. You can use:
- A character style
- A paragraph style
- A XML tag
Say our "WHO is WHO" project introduces person by their name. In the InDesign Layout, a paragraph style "NAME" is applied to the text we want to grab. Pick "paragragh style" as the key and select "NAME" in the list. Evetytime a new "NAME" text is found, a new PDF is created and the name is by default the content of the text (M. DOE in our case).
But if needed, use character styles, xml tags or sections to get your PDFs correctly exported.
Pick the PDF preset you want to use for your project.
Pick the folder where you want to export your files
By default, PDFs will be named based on the found text (or section names). The "$" sign refers to this text. But feel free to use other variables such as:
- [[DOC]] : the current document name
- [[FPG]] : the name of the page where the text is found
- [[TPG]] : the total of pages in the current document
- [[PGR]] : the range of pages for the exported sequence
You can also use the following options:
- Background Export : export PDF files in the background letting you use InDesign during exports
- Open Folder : open folder after export
- Open PDFs : open PDFs after export
- Overwrite files : overwrites existing files
- Keep data: saves UI selections
- Use as a delimiter : inform the script that you wan to export all pages included in a sequence. For ex, if a key is found on pages 1 and 5, the first PDF will contain 4 pages (1-4).
Designed en 2010 !
This script was designed in 2010 when we were using InDesign CS5. But it works with CC2023 without a hitch. Of course, if you are having troubles using it, let us know. And if you find this script useful, consider donation ;)
To download the file, you can go here: https://www.ozalto.com/solutions/telechargement/
Leave your comment