Article View: adobe.scripting.indesign
Article #14578Re: How do I batch "convert" a bunch of InDesign CS to PDF files
From: Peter_Kahrel
Date: Thu, 22 Jan 2004 19:05
Date: Thu, 22 Jan 2004 19:05
14 lines
1299 bytes
1299 bytes
Well, that's not very helpful, so here's a script to do it. Thought I might need it myself soon, anyway. This should work on Macs and PCs. Where it says "d/test", fill in the drive/directory where the ID files are that you want to convert.
alldocs = Folder("/d/test").getFiles("*.indd");
for( doc = 0 ; doc < alldocs.length ; doc++ )
{
app.open( alldocs[doc] ) ;
pdfFile = new File( alldocs[doc].path +"/" + stripExt( alldocs[doc].name )+"pdf" ) ;
app.activeDocument.exportFile( ExportFormat.pdfType , pdfFile ) ;
app.activeDocument.close() ;
}
function stripExt ( f ) {
return f.substring( 0 , f.length-4 )
}
Technical Details
Message-ID:
<2ccf82ab.1@webx.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!webxReferences:
<2ccf82ab.-1@webx.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,6535114930b42db X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2004-01-22 11:08:05 PST From: Peter_Kahrel@adobeforums.com Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!webx Newsgroups: adobe.scripting.indesign Subject: Re: How do I batch "convert" a bunch of InDesign CS to PDF files Message-ID: <2ccf82ab.1@webx.la2eafNXanI> Date: Thu, 22 Jan 2004 11:05:41 -0800 References: <2ccf82ab.-1@webx.la2eafNXanI> Lines: 18 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit