Copy link to clipboard
Copied
Is there a script (that works) or does anyone know of any way to rename pages in indesign rather than 1,2,3,4 etc
I manually export each page separately and have to rename them accordingly. Which takes too much time. I have to rename them the page size and language it is in.
Two examples of exported page names- 1080x1080_DE.jpg 1080x1920_FR.jpg
If there is a way to rename all the pages on a template that I can use in the future as it would save hours. Ie, click export all and they would be saved with the correct file names.
I have had a look online and have no joy.
Copy link to clipboard
Copied
Though scripters do pop in here, you can ask in the scripting forum.
But it might help to let us know what the endgame is here. Why are you doing this?
Copy link to clipboard
Copied
Hi Bob,
thanks for the reply. I wanting to have each page saved out as jpegs.
I would like to name the pages before exporting. So that the file saves with the page name.
So that in the future I could use this as a template an export them all rather having to export each page and rename individually.
Does this make sense?
Copy link to clipboard
Copied
My ExtractPages (Extract Pages | Id-Extras.com ) exports PDFs and InDesign pages, not JPEGs. But for the naming, it would probably work. What exactly are you exporting? JPEGs?
Ariel
Copy link to clipboard
Copied
Hi TaW,
Yes Jpegs.
I have attached a screenshot showing two of my pages. (there are 27 in total)
The measurements 360 x 610 and 180 x 320 are the dimensions of each page.
This is what I would like the names of the pages/saved files to be.
Is this something your script could help with? (I am sure I can convert the pdf to jpeg in bulk online somewhere).
The main issue is having the pages pre named so that I can use the indesign file as a template and export all pages named correctly in one go.
Does that make sense?
Thanks for the reply.
Copy link to clipboard
Copied
ExtractPages can use a lot of different parameters for the names of the files it produces. So it could, with one click, export the document to separate PDFs, one per page, and name them based on all these things: Extract Pages: File Naming Help | Id-Extras.com
In your case, you could create a template where each page is a separate section, and each section is named as you like. Then tell ExtractPages to use the section name for the filename.
You could also include hidden text on each page containing the required file name for that page. Apply a paragraph style to that text, and then base the file naming on that paragraph style.
By the way, you are aware that for a while now it's been possible to save an InDesign file as separate PDFs, one per page, and automatically name them according to page size? The only thing missing would be the language tag you mention in the first post.
Ariel
Copy link to clipboard
Copied
Thanks Taw,
I plan to buy your script but may be a while until I can. It seems what i need.
In the mean time how would I export as just individual pages as separate pdf's named as the dimensions of the page?
This is a big help thank you
Copy link to clipboard
Copied
Hi Tom,
InDesign CC 2018.1 and CC 2019 are able to do this by using the ^S suffix parameter in the PDF Export dialog:
However, do not try this by not using a name when the PDF export dialog asks for a name and a location to the save the PDF to.
Just tried that and InDesign crashed.
So you need to use at least one character for the name that you later have to get rid of.
In my sample above I just used one character A that will be part of the final name.
Do not try this:
The result of the export as made from my first screenshot above is a folder named according to the base export name ( that is a single character in this sample ) and contains three different PDFs like that:
Regards,
Uwe
Copy link to clipboard
Copied
Hi Tom,
when on Windows also see into Advanced Renamer:
https://www.advancedrenamer.com/
FWIW: It even allows renaming by using JavaScript:
https://www.advancedrenamer.com/user_guide/example_scripting
So if you see a unique pattern in what order renaming by adding _DE or _FR should be done we could suggest a JavaScript function perhaps.
Regards,
Uwe
Copy link to clipboard
Copied
Have a workaround, no script required.
1 In indesign save pages as PDF
2 In acrobat pro, make bookmarks from structure (here you can choose your indesign paragraph style)
3 Acrobat names the bookmarks with the contents in your paragraph style
4 In acrobat split document based on the bookmark names.
5 You now have a PDF file per bookmark with custom filenames (content of text in paragrap styles)
6 In photoshop open 1 PDF and apply your settings (crop box, dimensions, resolution...)
7 In photoshop use the image processor to convert the PDF's to JPG's
this works for me...
Copy link to clipboard
Copied
var outputs = "1080x1080_DE\
1080x1920_FR\
1080x1080_BE\
1080x1920_UK\
1080x1080_NZ\
1080x1920_AUS";
var doc = app.activeDocument;
for(var i = 0; i<=doc.pages.length-1;i++){
var output_filename = outputs.split("\n") + ".jpg";
var pageName = doc.pages.name;
app.jpegExportPreferences.jpegExportRange=ExportRangeOrAllPages.EXPORT_RANGE;
app.jpegExportPreferences.pageString = pageName;
doc.exportFile(ExportFormat.JPG,File("~/Desktop/" + output_filename));
}
Using the Mac Platform, saving to the Desktop.
Just change the outputs variable, and as long as you have the same amount of pages in your document that the outputs variable is looking for then you're sweet!
There is no error handling in this..
Copy link to clipboard
Copied
all you need is this brilliant script!
https://www.marspremedia.com/software/indesign/export-named-pages
Copy link to clipboard
Copied
Excelent!
It's exactly what I was looking for.
Thank You