Batch create .article files? | Adobe Higher Education
Skip to main content
jeffreyp6484616
Level 2
August 25, 2015

Batch create .article files?

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.)

Ce sujet a été fermé aux réponses.

2 commentaires

Adobe Employee
August 25, 2015

Hi,

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 = app.open(srcFolderContents[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

    doc.close;

}

Level 4
August 25, 2015

Is this script able to work with inDesign files in sub-folders as generated by the script available here:

Rapidly create folios using a PDF-to-InDesign script | Adobe Developer Connection

Level 4
August 26, 2015

The lock file issue is because the doc isn't actually closed. Change line 14 from "doc.close;" to "doc.close();" and that will clear that up.

franciscon89715259‌ the script worked fine in with my install. Are you certain the DPS plug-ins are installed?


After adding the parentheses "()" to do "doc.close;" and now having the script read "doc.close();" worked successfully.

All inDesign files in subfolders each now has a corresponding .article file, and all the inDesign files properly closed.

I did get stuck for a while force quitting inDesign and having to close all the files manually. inDesign stopped responding when I tried the script with changes and all the files were open but invisible. After the first force quit all the open files were visible and I closed them all. After that I force quit inDesign a few times and it still would not respond after force quitting. I had to trash the preferences (and save my scripts and workspaces). Back to normal now.

Anyway, thanks! This is great! I'll report back if we run into anything else related to this script.

Adobe Employee
October 20, 2015

Hi,

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

* https://helpx.adobe.com/digital-publishing-solution/help/integrating-dps.html

-Klaasjan