🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: adobe.scripting.indesign
5 messages
5 total messages Started by James_Leyland Tue, 20 Jan 2009 15:05
PDF - Export multiple pages to single PDF
#1848
Author: James_Leyland
Date: Tue, 20 Jan 2009 15:05
12 lines
1004 bytes
Hi guys,

I have a project where I wish to automate exporting multiple pages to different PDFs (i.e. pages 1-4 to pdf A, pages 5-8 to pdf B, etc.

Does anyone know if there is a script that can do this for me?

I am aware you can export individual pages to PDFs, but have not come across something that would allow me to do what I need.

Any help would be great.

Thanks,
James
Re: PDF - Export multiple pages to single PDF
#1849
Author: loic_aigon
Date: Tue, 20 Jan 2009 15:35
1 lines
757 bytes
Does anyone know if there is a script that can do this for me? I think at least a dozen through that forum...
Re: PDF - Export multiple pages to single PDF
#1850
Author: James_Leyland
Date: Tue, 20 Jan 2009 15:54
1 lines
736 bytes
If anybody is willing to help guide me in the correct direction I would be grateful as I'm not that great with scripting myself.
Re: PDF - Export multiple pages to single PDF
#1854
Author: 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");
Re: PDF - Export multiple pages to single PDF
#1856
Author: Olav_Kvern
Date: Tue, 20 Jan 2009 18:15
7 lines
848 bytes
Hi James,

Just FYI (thanks for helping, loic_aigon!): There are also several scripts that show how to do this in the Scripting Guide (saved as complete scripts in the associated Zip archive).

Thanks,

Ole
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads