Copy link to clipboard
Copied
Hi,
I have an InDesign source document within more than 30mb metadata info, when we use the source file in another document, adding 30mb additionally when getting pages one-by-one. So, we don't retain the meta info in source document. I'm trying to remove the metadata information from the source file and i can't open the document.
I have followed the below process,
1. Save the source file to IDML
2. Change the file extension from .dml to .zip
3. Unzip the zip folder
4. Edit the meta info in xml file and save
5. Zip the folder
6. Change the file extension from .zip to .idml
7. Then, I can't open modified file.
Can you please guide me know if I missed any important steps.
Thanks in advance,
Selva
Hi Selva,
You can easily edit XMP metadata without passing through IDML thanks to the Adobe XMPLIB library:
Given that file is the indd file you are after:
...var main = function() {
var file = File.openDialog();
if ( !file || !/\.indd$/.test(file.name) ) return;
var xmpFile = new XMPFile(file.fsName, XMPConst.UNKNOWN,XMPConst.OPEN_FOR_UPDATE);
var xmp = new XMPMeta();
if (xmpFile.canPutXMP(xmp)) {
xmpFile.putXMP(xmp);
}
xmpFile.closeFile(XMPConst.CLOSE_UPDATE_SAFELY);
}
try
{
ExternalObject.AdobeXMPScript = ne
Copy link to clipboard
Copied
Hi Selva,
You can easily edit XMP metadata without passing through IDML thanks to the Adobe XMPLIB library:
Given that file is the indd file you are after:
var main = function() {
var file = File.openDialog();
if ( !file || !/\.indd$/.test(file.name) ) return;
var xmpFile = new XMPFile(file.fsName, XMPConst.UNKNOWN,XMPConst.OPEN_FOR_UPDATE);
var xmp = new XMPMeta();
if (xmpFile.canPutXMP(xmp)) {
xmpFile.putXMP(xmp);
}
xmpFile.closeFile(XMPConst.CLOSE_UPDATE_SAFELY);
}
try
{
ExternalObject.AdobeXMPScript = new ExternalObject('lib:AdobeXMPScript');
main();
}
catch (e)
{
alert(e.message+"//"+e.line );
alert('Unable to load the AdobeXMPScript library!');
}
Be aware the file needs to be closed or it will fail.
Copy link to clipboard
Copied
Hi Loic,
The alternate solution is tremendous. It's working fine on my file. Thanks you so much.
selva
Copy link to clipboard
Copied
Another option is to use ExifTool to remove all XMP (or specific) metadata:
exiftool -r -XMP:all= 'MAC OS PATH TO FILE OR FOLDER'
exiftool -r -XMP:all= "WIN OS PATH TO FILE OR FOLDER"
Copy link to clipboard
Copied
There may not be any need to edit via IDML:
Copy link to clipboard
Copied
If one does wish to use IDML, then there are “tricks” that are needed:
https://indesignsecrets.com/topic/how-do-i-re-zipcompress-an-expanded-idml-file
or
Re: Edit IDML, remove metadata, save, again open in InDesign - can't open