🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #9071

Re: JS Batch converter for CS2

#9071
From: feketef
Date: Thu, 14 Sep 2006 23:27
21 lines
1419 bytes
Hello,

I try to export more than one opened document as PDF and the created PDFs are all the same except the name of the files, basically the frontmost document gets PDFed.
I am working on MAC with CS and running the following script:

if(app.documents.length != 0){
var myFolder = Folder.selectDialog ("Choose a Folder");
if(myFolder != null){
	for(i=app.windows.length-1;i>=0;i--){
		if(app.windows[i].parent.visible==false)
			app.windows[i].bringToFront();
		myName=app.windows[i].parent.name;
		myFile=new File(myFolder+"/"+myName.replace( /\.indd/, '.pdf' ));
		app.windows[i].parent.exportFile(ExportFormat.pdfType, myFile, false, "package");
		app.windows[i].parent.close();
	}
}else alert("Please open a document and try again.");
}

Best,
Ferenc
Technical Details
Message-ID: <3bbf225d.13@webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news.glorb.com!news-out1.kabelfoon.nl!newsfeed.kabelfoon.nl!bandi.nntp.kabelfoon.nl!news.isoc.lu!webcrossing
References: <3bbf225d.-1@webcrossing.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,fd17be16b0df5a69,start
X-Google-Attributes: gidf939a,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: feketef@adobeforums.com
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news.glorb.com!news-out1.kabelfoon.nl!newsfeed.kabelfoon.nl!bandi.nntp.kabelfoon.nl!news.isoc.lu!webcrossing
Newsgroups: adobe.scripting.indesign
Subject: Re: JS Batch converter for CS2
Message-ID: <3bbf225d.13@webcrossing.la2eafNXanI>
Date: Thu, 14 Sep 2006 16:27:41 -0700
References: <3bbf225d.-1@webcrossing.la2eafNXanI>
Lines: 24
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit