Copy link to clipboard
Copied
Je souhaiterais pouvoir renommer automatiquement mes fichiers à l'export en jpg de Indesign. Pourquoi pas en fonction d'un mot placé sur la planche correspondante, ou du nom de la page? Est-ce possible?
Merci à vous
1 Correct answer
Hi there,
Thanks for reaching out. I am afraid there is no option available in InDesign to rename the export file according to a page/word placed on the corresponding board. However, you may try the suggestions shared in earlier responses and see if they help. Additionally, you can share this feature request with our product team using the UserVoice page ( https://indesign.uservoice.com/ ), and they may consider it for the future release of InDesign. This way, you will keep getting all the upd
...Copy link to clipboard
Copied
Hello,
I think this is what you're after....
1. Start off by creating a Paragraph style named "jpg_name"
2. Create a text box in the slug area with a portion of the box within the page bounds and assign the Paragraph style "jpg_name"
3. Type the word in the text box for the jpg naming
4. Run the script to export the jpgs
The below script will export jpgs named by the contents of the text box useing the Paragraph style named "jpg_name from each page
var doc = app.documents[0];
var mySelectedFolder = Folder.selectDialog ("Select a Folder");
if(mySelectedFolder != null){
}else{
exit();
}
for(var p = 0; p < app.documents[0].pages.length; p++) {
var frames = app.documents[0].pages[p].textFrames;
var jpg_name = null;
for(var i = 0; i < frames.length; i++) {
try {
if(frames[i].paragraphs[0].appliedParagraphStyle.name == 'jpg_name') {
jpg_name = frames[i].paragraphs[0].contents;
break;
}
}catch (e){
}
}
if (jpg_name == null) {
alert ('Error!\nThe Paragraph Style "jpg_name" is not applied to one or more of the pages or is Labeled Incorrectly.');
exit();
}
if(jpg_name != null) {
app.jpegExportPreferences.jpegExportRange = ExportRangeOrAllPages.EXPORT_RANGE;
app.jpegExportPreferences.pageString = app.documents[0].pages[p].name;
app.jpegExportPreferences.jpegQuality = JPEGOptionsQuality.MAXIMUM;
app.jpegExportPreferences.exportResolution = 150;
app.jpegExportPreferences.antiAlias = true;
doc.exportFile(ExportFormat.jpg, File(mySelectedFolder +"/"+ jpg_name + ".jpg"), false);
}
}
alert("Done Exporting jpeg's!");
Regards,
Mike
Copy link to clipboard
Copied
I usually use Bridge to automatically rename files in a folder following a structured name system.
Batch rename from Run tasks from Tools menu, batch rename files, and auto-stack HDR and panorama images (adobe.com)
Copy link to clipboard
Copied
thank you so muche for your answer!
It's a little bit difficult to me to use script but i'll can do it!
Copy link to clipboard
Copied
oups it was for the latest post!
Bridge can be an other good solution
Copy link to clipboard
Copied
Thank you so much Mike for your answer!
It's a little bit difficult to me to use script but i'll can do it!
Copy link to clipboard
Copied
Hi there,
Thanks for reaching out. I am afraid there is no option available in InDesign to rename the export file according to a page/word placed on the corresponding board. However, you may try the suggestions shared in earlier responses and see if they help. Additionally, you can share this feature request with our product team using the UserVoice page ( https://indesign.uservoice.com/ ), and they may consider it for the future release of InDesign. This way, you will keep getting all the updates related to this feature, and other users can also upvote, which would help us prioritize.
Thanks & Regards,
Anshul

