Skip to main content
Inspiring
December 16, 2020
Answered

Relink PNG to PSD

  • December 16, 2020
  • 5 replies
  • 1113 views

Good Morning.

We get linked files that are PNG and we convert them to CMYK PSD file and keep them the same name except for the ext.

Is there a script that will relink PNG to PSD in Indesign. Right now we  manually relinking each one in the links panel.

Thanks

Fred

This topic has been closed for replies.
Correct answer jmlevy

No need for a script, go to the links panel and choose this in the dropdown menu (my screen shot is in French but you will easily understand)

 

5 replies

Inspiring
December 28, 2020

Thank you for all the input. the relink in the links pallet is the one that looks like the best fit for us. I will try some of the scripts also. Leaving them RGB doesn't really work for our work flow.

rob day
Community Expert
Community Expert
December 28, 2020

Are you exporting to PDF for print? If so, the Destination CMYK profile can be set in the PDF export preset and the conversion output numbers would be the identical.

Inspiring
December 28, 2020

One of the things want to make sure the backgrounds of the photos match the other backgrounds in the indesign file. Thanks anyway

Kasyan Servetsky
Legend
December 24, 2020

Here's a script I use for my workflow. It resaves the selected image as psd-file in photoshop as relinks it on InDesign.
However, it doesn't convert to CMYK, but a line of code can be added for this.

— Kas

Sunil Yadav
Legend
December 24, 2020

Try this below snippet : 

// You can include whatever Extension you wish for it in this below list for relinking
var extension = ["psd", "png"];
//============================================
var myDoc = app.documents[0];
for(var i = 0; i < myDoc.links.length; i++){
    var imageName = myDoc.links[i].name.split(".")[0];
    var folderPath = File(myDoc.links[i].filePath.replace(/\\/g,'/')).parent.fsName.replace(/\\/g,'/');
    if(myDoc.links[i].status.toString() != "NORMAL"){
        for(var x = 0; x < extension.length; x++){
            if(File(folderPath+"/"+imageName+"."+extension[x]).exists){
                myDoc.links[i].relink(File(folderPath+"/"+imageName+"."+extension[x]));
                break;
                }
            }
        }
    }
//============================================

Best

Sunil

rob day
Community Expert
Community Expert
December 16, 2020

There’s also no need to make the conversion to CMYK in Photoshop, the same conversion can be made from InDesign on an export to PDF or from the print RIP. On an Export, simply set the Output tab’s destination to Document CMYK and the RGB PNGs will be converted into your document’s assigned CMYK space.

jmlevy
Community Expert
jmlevyCommunity ExpertCorrect answer
Community Expert
December 16, 2020

No need for a script, go to the links panel and choose this in the dropdown menu (my screen shot is in French but you will easily understand)