Highlighted

Metadata problem on import

New Here ,
Sep 05, 2020

Copy link to clipboard

Copied

Hi, InDesign seems to freeze on the import of files with a lot of metadata. It's a Photoshop problem which extends to InDesign (but as it seems nobody at the PS forum seems to care). For example, I receive a .psd file with 225 MB (the actual size after stripping down the metadata is 20,5 MB!), which takes about 3 minutes to place into a InDD document. And the InDD file size goes up to over 400MB (after taking out the metadata it's 6,2 MB).
The problem: PS doesn't have a function to wipe this data, so I have to try via Affinity Photo or export (Save for web) layer by layer as .png, to rebuild the .psd.

 

I love InDD, but this and the switching back from the text-tool bug are driving me nuts!

Adobe Community Professional
Correct answer by rob day | Adobe Community Professional

There is a known problem with history metadata in Photoshop files bloating InDesign layouts. There is a discussion and scripting solution here:

 

https://community.adobe.com/t5/indesign/file-size-is-too-big/td-p/9370587?page=2#10084949

 

This script will remove the history metadata from a folder of image files:

 

 

//#target photoshop

var psdFolder = Folder.selectDialog("Select the folder containing PSDs", "");

// to include jpg, tiff, and eps use this:
var myFiles = psdFolder.getFiles(/\.(jpg|tif|eps|psd)$/i);
//var myFiles = psdFolder.getFiles(/\.(psd)$/i); 

for (var a = 0; a < myFiles.length; a++){
    var docRef = open(myFiles[a]);
    cleanMeta(docRef);
};   


function cleanMeta(d){
    if (ExternalObject.AdobeXMPScript == undefined) ExternalObject.AdobeXMPScript = new ExternalObject("lib:AdobeXMPScript");   
    var xmp = new XMPMeta( activeDocument.xmpMetadata.rawData);   
    xmp.deleteProperty(XMPConst.NS_PHOTOSHOP, "DocumentAncestors");   
    d.xmpMetadata.rawData = xmp.serialize(); 
    d.save();
    d.close();
};

 

 

After cleaning placed images, save out the InDesign file as a IDML and reopen.

TOPICS
Import and export, Performance

Views

26

Likes

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

Metadata problem on import

New Here ,
Sep 05, 2020

Copy link to clipboard

Copied

Hi, InDesign seems to freeze on the import of files with a lot of metadata. It's a Photoshop problem which extends to InDesign (but as it seems nobody at the PS forum seems to care). For example, I receive a .psd file with 225 MB (the actual size after stripping down the metadata is 20,5 MB!), which takes about 3 minutes to place into a InDD document. And the InDD file size goes up to over 400MB (after taking out the metadata it's 6,2 MB).
The problem: PS doesn't have a function to wipe this data, so I have to try via Affinity Photo or export (Save for web) layer by layer as .png, to rebuild the .psd.

 

I love InDD, but this and the switching back from the text-tool bug are driving me nuts!

Adobe Community Professional
Correct answer by rob day | Adobe Community Professional

There is a known problem with history metadata in Photoshop files bloating InDesign layouts. There is a discussion and scripting solution here:

 

https://community.adobe.com/t5/indesign/file-size-is-too-big/td-p/9370587?page=2#10084949

 

This script will remove the history metadata from a folder of image files:

 

 

//#target photoshop

var psdFolder = Folder.selectDialog("Select the folder containing PSDs", "");

// to include jpg, tiff, and eps use this:
var myFiles = psdFolder.getFiles(/\.(jpg|tif|eps|psd)$/i);
//var myFiles = psdFolder.getFiles(/\.(psd)$/i); 

for (var a = 0; a < myFiles.length; a++){
    var docRef = open(myFiles[a]);
    cleanMeta(docRef);
};   


function cleanMeta(d){
    if (ExternalObject.AdobeXMPScript == undefined) ExternalObject.AdobeXMPScript = new ExternalObject("lib:AdobeXMPScript");   
    var xmp = new XMPMeta( activeDocument.xmpMetadata.rawData);   
    xmp.deleteProperty(XMPConst.NS_PHOTOSHOP, "DocumentAncestors");   
    d.xmpMetadata.rawData = xmp.serialize(); 
    d.save();
    d.close();
};

 

 

After cleaning placed images, save out the InDesign file as a IDML and reopen.

TOPICS
Import and export, Performance

Views

27

Likes

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
Sep 05, 2020 0
Adobe Community Professional ,
Sep 05, 2020

Copy link to clipboard

Copied

There is a known problem with history metadata in Photoshop files bloating InDesign layouts. There is a discussion and scripting solution here:

 

https://community.adobe.com/t5/indesign/file-size-is-too-big/td-p/9370587?page=2#10084949

 

This script will remove the history metadata from a folder of image files:

 

 

//#target photoshop

var psdFolder = Folder.selectDialog("Select the folder containing PSDs", "");

// to include jpg, tiff, and eps use this:
var myFiles = psdFolder.getFiles(/\.(jpg|tif|eps|psd)$/i);
//var myFiles = psdFolder.getFiles(/\.(psd)$/i); 

for (var a = 0; a < myFiles.length; a++){
    var docRef = open(myFiles[a]);
    cleanMeta(docRef);
};   


function cleanMeta(d){
    if (ExternalObject.AdobeXMPScript == undefined) ExternalObject.AdobeXMPScript = new ExternalObject("lib:AdobeXMPScript");   
    var xmp = new XMPMeta( activeDocument.xmpMetadata.rawData);   
    xmp.deleteProperty(XMPConst.NS_PHOTOSHOP, "DocumentAncestors");   
    d.xmpMetadata.rawData = xmp.serialize(); 
    d.save();
    d.close();
};

 

 

After cleaning placed images, save out the InDesign file as a IDML and reopen.

Likes

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
Reply
Loading...
Sep 05, 2020 0