Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
1

Indesign script to export JPG and PDF when saving document

New Here ,
Jun 29, 2022 Jun 29, 2022

I am looking for a script to automatically export a JPG at 300 dpi and high quality + a PDF with a custom profile every time I save (or close) a document.
I have tried several but they don't work automatically.
Could someone help me?

TOPICS
Import and export , Scripting
1.5K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 03, 2022 Jul 03, 2022

Well, if you already have a script that will export your preferred formats, it's easy to change the Control-S keyboard shortcut to run your script instead of executing a File -> Save action. (If you're a Mac user, that'd obviously be Command-S instead.) You'd do that by going into Edit -> Keyboard Shortcuts -> Product Area -> Scripts and then scrolling down to your User scripts, picking your export script, and assigning the Control-S shortcut to your script. You could assign the Control-W shortcut for closing your window as well, I suppose.

 

I imagine you'd want a script that saved the document, then exported JPEG and PDF. I found this script that does a good job of exporting multiple-page documents as a series of JPEGs; you could change the export resolution and save it to your User Scripts folder so you can add a shortcut to it. However, it's hard for us to guess exactly what parameters you'd need for your whole save-everything script (if you've started a new file, do you want it to prompt you for a name? automatically assign it a hard-coded name? if there's already a file of that name, should it overwrite the previous file or increment the name, or what? what PDF export presets do you want? etc.) so I'd just say broadly that you can attach whatever behaviors you want to your Save key in this manner, which should get the automagically-export-every-time-I-save functionality. 

 

There's another way to do it, by using eventListeners to wait for a save event, then jump in and run your export code, but that seems like unnecessary amounts of scripting work for minimal improvement over the simple expedient of changing your shortcuts. 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Apr 28, 2023 Apr 28, 2023

Did you ever find a way to do this? I have a batch process script that will find all the INDD files in whatever folder structure you tell it to, open them, export to PDF or JPG, and close. But I need to save the INDD, save an idml, export a pdf, export a jpg with bleed AND export a jpg without bleed, sometimes just for 2 or 3 files rather than all the folders full of files and my current script still only does 1 format at a time. 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 28, 2023 Apr 28, 2023
LATEST

Peter Kahrel's batch export script will almost do this - I don't think the interface exposes a way to export a jpeg with bleeds.  But the Package option in his script will do all the rest (make a new folder, save indd, idml, pdf, and jpeg in it). 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines