You are on page 1of 9

extract. process. automate.

Lesson 3:Your rst IDMLlib Project


Author: Oliver Huser <ohaeuser@fhcon.de>

For more Information please visit http://idmllib.com

About ?

Content
Finally some coding examples to start with the IDMLlib Tutorial #1 - Setup your JAVA IDE Tutorial #2 - IDML Basics Need some JAVA knowledge Optional: InDesign CS 4 to create Demo Files

Targetskills & Prerequisites

Dont worry. Get Demoles from http://idmllib.com !

Why ?
You want to check out the IDMLlib in a few minutes You nally want to see how easy it is to access InDesign Content
2

What have you learned so far ?

Export / Create IDML Files Access IDML Containers Brief overview of the IDML structure
You will later nd out how important it is in order to access the different properties! Once you understand this the possibilities are endless! Note that we will add some comfort functions to the IDMLlib in the next releases so some information like grouped images will be easier to deal with.

Goal in this Tutorial

Load an IDML Containter File Access some basic document information Print out the information
or use your imagination :-) I posted some ideas later on ...

Basic Structure - Must haves!

You need to provide an IDMLlib Licence Key


available at http://idmllib.com

Load an IDML document (as created in Tutorial #2) Do not forget to issue an idml.close() at the end
otherwise your temp dir will be ooded ...

Code reviewed

Idml.setLicense("ILJD10-MYSECRET-1337-IDMLLIB-KEY");

Apply your Licence key. Otherwise nothing will work! this loads the the IDML File from the the sub dir test-data in the project get a document instance from the idml object. The document basically is the loaded designmap.xml now we access the CMYKProle property/attribute from the document and print it out

Idml idml = new Idml("test-data/idmltest2.idml"); Document document = idml.getDocument();

String cmykProle = document.getCMYKProle(); System.out.println("cmykProle = " + cmykProle); idml.close(); the close statement is very important, since we unpack the container automatically, it removes all temporary les afterwards.
6

Output

This is your output:

Info from the designmap.xml File for Reference

What have you learned ?

You know now how to ...


integrate the IDMLlib into your projects access quickly some basic information use this for a quality check for your documents build a nice little statistics tool We learn how to access text and images!

Some Ideas ...

Next ...

to check for instance if all image paths are correct!

Ressources

For more information


watch the video visit http://idmllib.com follow us on Twitter http://twitter.com/IDMLlib write an email ohaeuser@fhcon.de

for dev info contact Mr. Fink instead: ank@fhcon.de Yes we were not kidding when we claim the IDMLlib is easy to use !

Move on to Tutorial #4: Images and Text Objects!

You might also like