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

InDesign script to batch export png, jpg or pdf

Explorer ,
Jan 02, 2020 Jan 02, 2020

Copy link to clipboard

Copied

I'm looking for a script that can export png's or jpgs or pdf's. Anything that can be viewed without having indesign on your computer. Does anyone know of one? I've tried the batch export script from Peter Kahrel and it doesn't quite work for me as it takes about 3 minutes per document. Is there anything else that can accomplish this faster? I tried bridge, but the jpgs it exports are tiny for some reason. Can't figure it out.

 

Thanks in advance!

Scott

TOPICS
Import and export , Scripting

Views

7.5K

Translate

Translate

Report

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

correct answers 2 Correct answers

Community Expert , Jan 03, 2020 Jan 03, 2020

I mean, if you just want to export all open documents as pdfs with no extra fuss, this would work. The time it takes would be dependent on the complexity of the file to export, just as if it were done manually. This assumes your ID has the PDF/x1a preset loaded. 

 

 

 

var outputToPdf = function(doc, folder) {
    var exportFile = new File(folder.fsName + "/" + doc.name.slice(0,doc.name.lastIndexOf(".")) + ".pdf");
    var px1aPreset = app.pdfExportPresets.itemByName("[PDF/X-1a:2001]");
    try {
  
...

Votes

Translate

Translate
Community Expert , Jan 08, 2020 Jan 08, 2020

Right, I guess that's a popup when you open a doc, not a preflight thing.

 

After the var folder selectDialog line, you can try the following lines: 

 

     var currInteractPrefs = app.scriptPreferences.userInteractionLevel;

     app.scriptPreferences.userInteractionLevel = UserInteractionLevels.NEVER_INTERACT;

 

At the end of the script, be sure to set the prefs back to the way they were: 

      app.scriptPreferences.userInteractionLevel = currInteractPrefs;

 
Not sure if that will work or if it will jus
...

Votes

Translate

Translate
New Here ,
Jul 21, 2022 Jul 21, 2022

Copy link to clipboard

Copied

LATEST

Votes

Translate

Translate

Report

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