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

Is there a script to clear InDesign metadata (redundancy) or the clipboard, just like Photoshop?

Enthusiast ,
Jan 04, 2022 Jan 04, 2022

Copy link to clipboard

Copied

Version: CC 2022 17.0.1 64
My ID file has pictures and long documents.
When the ID is first opened, the speed is very fast.
But after a long time, it will slow down, and you can feel that the graphics card is not enough.
But using CS6 to modify this file will not get stuck.

I think if the clipboard can be cleared, or the metadata (redundancy accumulated during the operation) can be cleared.
Photoshop has such a script, is there an ID?

TOPICS
Bug , Feature request , How to , Performance , Scripting

Views

902

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

Community Expert , Jan 04, 2022 Jan 04, 2022

You can clear the clipboard simply copying something small like a word. 

To clean up a file try doing a save-as or saving/exporting as IDML and reopening the IDML file. 

Votes

Translate

Translate
Community Expert ,
Jan 04, 2022 Jan 04, 2022

Copy link to clipboard

Copied

You can clear the clipboard simply copying something small like a word. 

To clean up a file try doing a save-as or saving/exporting as IDML and reopening the IDML file. 

David Creamer: Community Expert (ACI and ACE 1995-2023)

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
Enthusiast ,
Jan 04, 2022 Jan 04, 2022

Copy link to clipboard

Copied

Thank you so much
Yes, saving as IDML seems to optimize the file.
It will be much faster after opening it again.
But this is too annoying and error-prone.

I don't understand why the higher the version of InDesign, the slower the speed.
In fact, we don't need many functions at all.
If you have options, you can choose to turn off these features, it will be very good

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 ,
Jan 05, 2022 Jan 05, 2022

Copy link to clipboard

Copied

You shouldn't have to do the IDML save very often--just you when feel the file is being troublesome. Other times a simple Save As should suffice.

 

Some ideas for InDesign (may not apply to you):

  • Don't work in High Performance mode or leave on Overprint Preview except as needed.
  • Break your document into smaller sections and use the Book feature. 
  • If you tend to have Photoshop, Illustrator, or other programs open at the same time, make sure your computer can handle it. 
  • Don't depend on OS updates to update GPU cards to the latest driver--go to the manufacturer.
  • Don't update software right away, especially if in the middle of a big project; scan the forums to see if programs problems have been solved. (Change the CC Preferences not to remove old versions.)

 

A couple of other things you can do to speed things up (may not apply to you):

  • Don't VPN to your work computer if you can help it. 
  • Don't work off of a server if you can help it.

Of course, these are not always possible, but it's better to work locally and use the server to back up your work. 

 

Sometimes I think software companies assume everyone is constantly upgrading their computer systems and don't speed as much time tightening the code for maximum efficiency. InDesign was created as a modular program--being able to not load certain modules could be useful. Submit your idea here:

https://indesign.uservoice.com/forums/601021-adobe-indesign-feature-requests

 

David Creamer: Community Expert (ACI and ACE 1995-2023)

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 ,
Jan 05, 2022 Jan 05, 2022

Copy link to clipboard

Copied

Very practical advice from @Creamer Training.

 

Only addition I have is to reduce the number fonts that are active on your computer, and totally remove any that you know you'll never use. A good font management program can help you manage your fonts, like FontExplorer https://www.linotype.com/6876/font-management.html

 

|    Bevi Chagnon   |  Designer & Technologist for Accessible Documents
|    Classes & Books for Accessible InDesign, PDFs & MS Office |

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 ,
Jan 04, 2022 Jan 04, 2022

Copy link to clipboard

Copied

Hi,

I am not sure, but you can try to turn off the setting in Clipboard Handling.

Please see screenshot.

Screenshot 2022-01-04 at 7.56.46 PM.png

Best regards

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 ,
Jan 04, 2022 Jan 04, 2022

Copy link to clipboard

Copied

Photoshop has such a script, is there an ID?

 

Photoshop files can have a problem with excess ancestor metadata, which can be cleared via Javascript. Ancestor metadata can find its way into an InDesign layout, and if that is your problem the ID document’s file size would be unusually large. 

 

You could try this script, which opens placed Photoshop files, clears ancestor metadata, updates the links, and does a save as. Make sure you have a reliable backup of the ID file and its assets before running the script.

 

 

 

/*
* Clear ancestor metadata from document images
* Version 1.0
* Rob Day 2020-2021
*/

#target indesign
#targetengine "session" 

var doc = app.documents.item(0);
var fp = doc.filePath;
var lnks = removeDuplicates(doc.links.everyItem().name)

var lPaths = [];

for (var i = 0; i < lnks.length; i++){
    var l = doc.links.itemByName(lnks[i])
    if (l.parent.constructor.name == "Image" && l.status != 1819109747) {
        lPaths.push(l.filePath)
    } 
};   

//Send the array of file paths to Photoshop
runPhotoshop(lPaths);


/**
* Update the ID links after Photoshop saves 
*  void 
* 
*/
function upDate(){
    var lks = doc.links;
    
    for (var i = 0; i < lks.length; i++){
        //$.writeln(lks[i].name + " Uppdate")
        while (lks[i].status != LinkStatus.NORMAL) {
            lks[i].update();
        }
    }
    doc.save (File(fp + "/" + doc.name))
}


/**
* Opens Photoshop via Bridgetalk and run psScript() function
*  the array of file paths to open 
*  value void
* 
*/
function runPhotoshop(a){
    var bt = new BridgeTalk();  
    bt.target = "photoshop";  
    bt.body = "var a = "+a.toSource()+";"  
    bt.body += psScript.toString() + "psScript();";

    bt.onResult = function(resObj) {
        upDate()
    }  

    bt.onError = function( inBT ) { alert(inBT.body); };  
    bt.send(8);  
      
    function psScript() {  
        for (var i = 0; i < a.length; i++){
        var d = open(File(a[i]));
        //https://community.adobe.com/t5/indesign/file-size-is-too-big/td-p/9370587/page/2
        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();
            //$.writeln(d.name + " Saved")
            d.close();
        }; 
    }  
}


/**
* Removes duplicates from the array
*  an array to edit 
*  an array with no duplicates 
* https://community.adobe.com/t5/indesign/js-how-to-remove-duplicate-items-from-an-array/td-p/3044978
*/

function removeDuplicates(a){
    var ra = new Array();
    var o = new Object()
    for( i=0 ; i<a.length ; ++i ){
        o[a[i]] = null;
    }
    for( a[i] in o ){
        ra.push(a[i]);
    }
    return ra;
}

 

 

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
Enthusiast ,
Jan 04, 2022 Jan 04, 2022

Copy link to clipboard

Copied

You are always great.
You have solved many problems.
Thank you so much.

Your script is photoshop.
Can it be used on InDesign, let me try

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
Enthusiast ,
Jan 05, 2022 Jan 05, 2022

Copy link to clipboard

Copied

Run in ID, prompt this

 

提示.jpg

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 ,
Jan 05, 2022 Jan 05, 2022

Copy link to clipboard

Copied

Your script is photoshop.

It’s an InDesign script that opens document links into Photoshop and saves them. I have not upgraded to 2022, so I can‘t test it in the new version, but here is a compiled version that you can copy directly into your ID scripts folder and run from the Scripts panel. Try it with both InDesign and Photoshop running:

 

https://shared-assets.adobe.com/link/9a2cbd1d-bd8d-4fdc-5232-98128f54348b

 

However, the script would not solve general InDesign performance issues—the excess metadata problem isn’t that common. If there is extra metadata it would show up as an unusually large file size, for example this 256MB ID file has one page with one flattened .PSD link:

 

Screen Shot 14.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
Enthusiast ,
Jan 06, 2022 Jan 06, 2022

Copy link to clipboard

Copied

I have opened both photoshop and InDesign
I also run the script in InDesign.
Still prompted the same error.
I gave up, hope the next ID version will be improved

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
Enthusiast ,
Jan 06, 2022 Jan 06, 2022

Copy link to clipboard

Copied

LATEST

Is there any software that can monitor the file size changes in the InDesign installation path?
Or a certain process of monitoring InDesign takes up too much memory or CPU?
So  can know which process has the problem

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 ,
Jan 05, 2022 Jan 05, 2022

Copy link to clipboard

Copied

Sounds like you don't have Photoshop installed.

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