There is a way to export an IDML file without opening it:
// blindOpen_and_IDML-Export.jsx
var _file = File.openDialog("InDesign-Datei"); // Auswahl einer Datei
if(_file != null)
{
var d = app.open(_file, false); // Öffnen der Datei, ohne sie anzuzeigen
d.exportFile(ExportFormat.INDESIGN_MARKUP, File(_file.fullName.replace(/.indd$/i,'.idml'))); // Export im IDML-Format
d.close(SaveOptions.NO); // Schließen ohne zu sichern
}
Save this code in a text file and change it ending to .js
Put it there, where your scripts are and let it run and follow the instructions.
Did you embed the PNG file or did you link it as external asset? Embedding is the main cause of corrupted file.
Why do you use PNG? I recommend always never to use it in InDesign as itcauses often problems. If it has transparency, use PSD.
... View more