🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #1854

Re: PDF - Export multiple pages to single PDF

#1854
From: loic_aigon
Date: Tue, 20 Jan 2009 17:45
20 lines
1110 bytes
var doc = app.activeDocument;
var pg=doc.pages;
var docName = doc.name;
var docFolder = File(doc.fullName).parent;
alert(docName);
for(i=0; i<pg.length;i=i+4) { 	var p = i+1;

	if(i+4>=pg.length)
	{
		var P = pg.length;
	}
	else
	{
		var P = (i+4);
	}
	var pdfFile = docFolder + "/"+docName.split(".indd")[0] + "_"+p+"to_"+P+".pdf";
	app.pdfExportPreferences.pageRange = p+"-"+P;
	doc.exportFile(ExportFormat.PDF_TYPE,new File(pdfFile), undefined, undefined, undefined, false);
}
alert("done");
Technical Details
Message-ID: <59b79029.2@webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!newshub.sdsu.edu!webcrossing
References: <59b79029.-1@webcrossing.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,ff08a087a0387f5a
X-Google-Attributes: gidf939a,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: loic_aigon <loic_aigon@yahoo.fr>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!newshub.sdsu.edu!webcrossing
Newsgroups: adobe.scripting.indesign
Subject: Re: PDF - Export multiple pages to single PDF
Message-ID: <59b79029.2@webcrossing.la2eafNXanI>
Date: Tue, 20 Jan 2009 09:45:23 -0800
References: <59b79029.-1@webcrossing.la2eafNXanI>
Lines: 24
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit