Article View: adobe.scripting.indesign
Article #9632Re: How to name PDF export using InD current file name?
From: Dave_Saunders
Date: Tue, 15 Aug 2006 17:16
Date: Tue, 15 Aug 2006 17:16
15 lines
1296 bytes
1296 bytes
Does this function help?
function exportPDF(pageName,preset) {
var altName = "000".slice(0,3-pageName.length) + pageName;
var myName = ( "/" + altName + myDoc.name).split(".indd").join(".pdf");
var myDestFile = File(myFolder.fullName + myName);
app.pdfExportPreferences.pageRange = pageName;
myDoc.exportFile("Adobe PDF", myDestFile, false, preset);
} // Close out exportPDF function
I used it to export pages within an InDesign document to individual pages with the file name incorporating the page name as a prefix.
Dave
PS: I deleted your duplicate. There's no need to post the same topic more than once. Posting to the existing topic brings it to the for.
Technical Details
Message-ID:
<3bc144b2.4@webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news.germany.com!news.ecp.fr!news.stben.net!webcrossingReferences:
<3bc144b2.-1@webcrossing.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,1aed37f8dc66a37e X-Google-Attributes: gidf939a,public X-Google-Language: ENGLISH,ASCII-7-bit From: Dave_Saunders@adobeforums.com Newsgroups: adobe.scripting.indesign Subject: Re: How to name PDF export using InD current file name? Message-ID: <3bc144b2.4@webcrossing.la2eafNXanI> Date: Tue, 15 Aug 2006 10:16:01 -0700 References: <3bc144b2.-1@webcrossing.la2eafNXanI> Lines: 18 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news.germany.com!news.ecp.fr!news.stben.net!webcrossing