Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list

Batch create .article files?


Level 2

Since you can't batch update the files in a folio any longer from within InDesign, is it possible to batch create .article files, preferably from the book palate? (Export as PDF doesn't give the option, at least in CC 2014.)

1 Accepted Solution




You could do this via InDesign scripting.

This sample script will ask you to select a folder and will then generate .article files for all the Indd files in that folder.

You may need to modify this script for your environment and setup.

var srcFolder = Folder.selectDialog("Please select path to the InDesign files"); // get source folder

srcFolderContents = srcFolder.getFiles("*.indd"); // get a list indd file

for (var i = 0, n = srcFolderContents.length; i != n; i=i+1) // for each indd file create an article


   var articleName = srcFolder + "/" + srcFolderContents[i].name.replace(".indd",".article");

   var doc =[i], false);

   var dpsArticleP= [

    [ "assetformat", "pdf"],           // pdf, png, jpg or auto (auto chooses between png and jpg)

    [ "showprogressbar", false ]     


    app.exportDpsArticle (File(articleName), doc, dpsArticleP); // export article



0 Replies


Level 5

I figured but thought I'd give it a shot!

The latest version of the script returns an error:


However taking the statement:

    doc.exportFile(ExportFormat.PNG_FORMAT, File(articleName.replace(".article",".png")));

and adding it to line 18 of the previous version of the script worked very well. The script exported a PNG file of each inDesign file along with the corresponding .article file.



To export just the first page, you need to set the export range in pngExportPreferences.

So for example:

app.pngExportPreferences.pngExportRange = PNGExportRangeEnum.EXPORT_RANGE;

app.pngExportPreferences.pageString = "1";

doc.exportFile(ExportFormat.PNG_FORMAT, File(articleName.replace(".article",".png")));

This is turning into some sort of Javascript code camp!


Level 5

It sure is! This is fantastic how this script came together and how it's shaping up!

I ran the script again after adding:

app.pngExportPreferences.pngExportRange = PNGExportRangeEnum.EXPORT_RANGE;

app.pngExportPreferences.pageString = "1"; lines 18 and 19 (the third line was the same as before).

The script ran without a hitch. I added a second page to the first inDesign document in order to test exporting only page 1 as a PNG (all my test files only had one page).




The documentation for the InDesign API (Extendscript) for exporting articles (and uploading them into DPS) can be found here: