Copy link to clipboard
Copied
Hello Adobe Community,
I'm pleased to share my PDF export script with everyone.
"exportPageRangesToPDF.jsx"
https://github.com/MoebiusSt/exportPageRangesToPDF.jsx
Description:
This InDesign script (Adobe InDesign CC 19.5 currently) exports page ranges to separate PDFs. It provides a fast way to export multiple page ranges from your InDesign document to individual PDF files and reduces file-naming and handling for you. It's become my standart PDF export routine used daily.
See screenshots attached.
Version:
v2.0, Date: 2024-09-07
Features:
Usage:
Launch the script from within Adobe InDesign's script panel or with your custom keyboard shortcut. Enter your desired page ranges into its edit text box and click "PDF export". It will export all page ranges to PDFs with the given PDF preset and work folder you provide in its settings. It has many features designed for convenience.
Input Format
Each line in the input text area should follow this format:
Page or PageRange(label)
The label in brackets is optional. Do not use commas.
Example Input:
1
5-7(Introduction)
8-15
16
17-20(Chapter 2)
Output File Naming
Exported PDF files will be named according to this schema:
[DocumentName]_pages_[PageRange]_[Label-from-brackets-if-given]_v[Version].pdf
Example Output:
MyDocument_pages_1_v1.pdf
MyDocument_pages_5-7_Introduction_v1.pdf
...
MyDocument_pages_17-20_Chapter 2_v1.pdf
Version Control:
The version number will auto-increment if an existing PDF file with the same name is found (e.g., from _v1 to _v2). To overwrite the last PDF file version and suppress version incrementation, add a minus (-) to the end of a line:
1-
5-7(Introduction)-
17-20
In this example, existing v1 PDFs for pages 1 and 5-7 will be overwritten, while the 17-20 range will increment to the next version.
Author and Credits:
Author: Stephan Möbius
Original idea: Jongware
Multi-language L10N function: Marc Autret (equalizer.js, 2012)
License:
MIT License – Do whatever you like with it, but whatever you do must also adhere to MIT License.
Contributing / Support
stephan dot moebius att gmail dot com
Caveats - Who will not benefit from this script:
- The script works EXCLUSIVELY WITH ABSOLUTE PAGE NUMBERING.
- It is not designed or tested for Book files (.indb).
- If section prefixes or unconventional page numbering are used, the script will likely give up quickly. Try it in simple, linearly numbered magazines, brochures, etc.
- Does it run on macOS? I can't test it. – The different decoding of file paths was difficult for me. I'm curious if it works.
Best regards,
Stephan
Copy link to clipboard
Copied
Hi, thanks a lot for sharing, I tried it on version 18.3 on OSX and it shows this alert
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Hi, yes, without using the script you can make the PDF without any problem.
Copy link to clipboard
Copied
Your screenshot isn't an error generated by script - it's InDesign's error.
Are you exporting manually to exactly the same destination?
Copy link to clipboard
Copied
It seems that this is it, it does not find the correct destination to save the PDF, it may be that since it was created for Windows there are differences with OSX
The developer himself has the doubt
"Does it run on macOS? I can't test it. – The different decoding of file paths was difficult for me. I'm curious if it works."
Copy link to clipboard
Copied