• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Export pages to jpg with individual filenames (from photo caption in slug)

Explorer ,
Apr 16, 2019 Apr 16, 2019

Copy link to clipboard

Copied

Hi Guys

I am wanting to export multiple pages of a INDD file to JPG and name the files based on a caption generated from the image on each page. (the caption appears in the slug area. Previously we have been doing this manually. We do Team and Portrait Photography, there is the option to use 'Sports Photo Automation' but this would leave me with much larger file sizes. I have seen a couple of posts relating to this but they don't seem to be specific enough and i am no scripter.

Thanks for any advice, apologies if this has been answered before.

Sample.jpg

TOPICS
Scripting

Views

4.9K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Explorer , Apr 17, 2019 Apr 17, 2019

if (app.documents.length != 0){

var myDoc = app.activeDocument;

MakeJPEGfile();

} else {

alert("Please open a document and try again.");

}

function myPS() {

try {

return myDoc.selection[0].appliedParagraphStyle;

} catch (e) {

alert("Place cursor to text with paragraph style for filenames");

exit();

}

}

function MakeJPEGfile() {

app.jpegExportPreferences.jpegQuality = JPEGOptionsQuality.high;

app.jpegExportPreferences.exportResolution = 72;

app.jpegExportPreferences.jpegExportRange = ExportRangeOrAllPages.exportR

...

Votes

Translate

Translate
New Here ,
Feb 02, 2024 Feb 02, 2024

Copy link to clipboard

Copied

DUDE hell yes lol that'll work for the time being, really appreciate it! You have no idea how much time this is going to save, major praise to you and the others on this thread. It's incredible to just hit the button and have all the files spit out and named exactly how we want. 

 

Originally I had tried to use chatGPT for some help with the code, it added some stuff about  "processMasterPages" but it didn't seem to work... lol not really surprising but it was worth a shot. idk what i'm doing with coding so thats as far as i got hah

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 21, 2024 Feb 21, 2024

Copy link to clipboard

Copied

Hi thanks for your earlier advice. Currently if there are two pages with the same export filename the second overwrites the first. Is there be a way to save the file as filename(2).jpg for example instead of overwriting?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 27, 2024 Feb 27, 2024

Copy link to clipboard

Copied

Are you asking with reference to the code marked as correct? If so then you can check the file if it exists and then change the name of the file before the export.

-Manan

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 28, 2024 Feb 28, 2024

Copy link to clipboard

Copied

LATEST

I suppose what I am asking for is if there is an opportunity to 'use unique names'. I have found a work around but its clumsy. I export the below trading cards as spreads for public viewing but need them as singles for production / imposition. It would be handy if on export the script just put a (2) after the filename rather than over write.Screenshot 2024-02-29 110825.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines