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

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

New Here ,
May 14, 2023 May 14, 2023

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.

TOPICS
Import and export
762
Translate
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 ,
Jul 19, 2023 Jul 19, 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

Translate
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 ,
Jul 20, 2023 Jul 20, 2023
LATEST

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 )

 

 

Translate
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