Skip to main content
Nikhil Ranka
Known Participant
September 3, 2021
Answered

Parsing/Extracting info from InDesign via API or SDK

  • September 3, 2021
  • 2 replies
  • 2859 views

Hello,

 

After parsing/extracting info from the received indd/idml input we want to build an HTML or convert it into a different format like JSON. 

Without having InDesign installed, are there any APIs or SDKs by Adobe that allows extracting/parsing detailed info from indd/idmls? Or, are there any Adobe suggested open-source libraries, to accomplish the same?

 

Looking forward to your response

 

Thanks!

Correct answer Manan Joshi

Yes @Nikhil Ranka the IDML file contains all the information like styling, color, object properties etc. The infomration is all that is needed to construct the document in InDesign. Regarding graphic assets, the IDML file contains the file path of the placed file, for embedded images I think it stores the base64 data of the embedded asset.

-Manan

2 replies

Participant
November 19, 2024

Sorry, @Nikhil Ranka, I'm late to the party. I had similar requirements as you and created an open-source library, to convert IDML documents into JSON and back again. This makes it easy to parse or even modify information of an InDesign document. The library is written in PHP and can be found here: https://github.com/BitAndBlack/idml-json-converter Maybe it will help you as well. 🙂

Community Expert
September 3, 2021

IDML is your friend. The format is open you can read the specification and parse the IDML file to pull out any information you want from the file. The parsing involves parsing XML files as IDML is a collection of mainly XML files that contain all the file info.

-Manan

-Manan
Nikhil Ranka
Known Participant
September 3, 2021

Thanks for your response Manan.

 

Being a backend developer and fairly new to the IDML format, wanted to understand if that contains all the info about the file ie: element location, overlay info, formatting info, etc., or there is some info that is left out.

Also are image and other graphic assets also accessible via the XML? 

 

Thanks!

Manan JoshiCommunity ExpertCorrect answer
Community Expert
September 4, 2021

Yes @Nikhil Ranka the IDML file contains all the information like styling, color, object properties etc. The infomration is all that is needed to construct the document in InDesign. Regarding graphic assets, the IDML file contains the file path of the placed file, for embedded images I think it stores the base64 data of the embedded asset.

-Manan

-Manan