Skip to main content
Participant
May 15, 2023
Question

IDML file format/structure (Special Characters used in Annotated Files/Bookmarks/Hyperlinks)

  • May 15, 2023
  • 2 replies
  • 882 views

I would like to understand the IDML file format/structure. Actually the requirement is to read a annotated IDML file, identify the special characters in it (like for bookmarks/hyperlinks) and replace them with simple characters for converting the annotated IDML file to a simple IDML file. All the above logic will be implemented in .Net Core. This simple IDML file will then be exported to PDF using .Net code/InDesign Server javascript.

 

Thanks.

This topic has been closed for replies.

2 replies

Community Expert
July 20, 2023

Hi @Manish Chhetia ,

to understand the IDML structure look into ExtendScript's method app.generateIDMLSchema() .

 

ExtendScript Document Object (DOM) documentation compiled by Gregor Fellenz:

https://www.indesignjs.de/extendscriptAPI/indesign-latest/#Application.html#d1e42253__d1e46948

 

Inspect the generated *.rnc files for reference.

 

Method generateIDMLSchema() has two arguments:

The first one is needed for the folder where the *.rnc files are written to, the second one is boolean, true or false.

In case of  true the schema will be used as if you look into a IDML file with folders and files. In case of false the whole schema will be written to one single *.rnc file.

 

Sample code for using generateIDMLSchema() with ExtendScript below.

Run the script from InDesign's Scripts > User panel. It will write the schema to your desktop:

 

( function()
{
	
	var argumentTwo = true ; // Also try false here

	var versionString = app.version;
	
	var myFolder = 
	Folder( 
			"~/Desktop" +"/"+
			"generateIDMLSchema-"+
			versionString+
			"-"+argumentTwo
	);

app.generateIDMLSchema( myFolder , argumentTwo );

}() )

 

Note:

After you unzipped an exported IDML file from an InDesign document and you have trouble to zip it again, do the following: First zip the mimetype file and then add all other components to the zip file.

 

Regards,
Uwe Laubender
( Adobe Community Expert )

 

 

Community Expert
July 20, 2023

Hello

As far as I know, IDML files are only zipped files, change the extension to .zip and then extract the data. 

You can then examine the XML data within the file.

 

Once finished, zip it up and rename to .idml again

 

Some zip decompressors don't work on the Mac and I find the Terminal better, by putting the file on your desktop rename to .zip and go to Terminal and type in CD Desktop

Then type

unzip <filename>.zip