What is KPL and how it relates to DP2?

KPL (Kodak Professional Language) is the underlying language that drives the DP2 Photo Lab production software. It is based on the C programming language family and it allows developers access to a lot of C methods and windows API’s. The language has been greatly expanded from it’s C roots to include features that are tailored to the photo production world.

The best way to understand this is to imagine DP2 as being a Runtime Environment in which KPL is Executed. The entire DP2 User interface and Underpinnings are implemented using KPL. Since KPL is an interpreted language, changes to DP2 do not require recompiling and can be done pretty much live.  Even thought documentation is limited, the fact that you can see all the code that is used to do everything in DP2, makes it easy to learn what does what. DP2 has a very powerful Programmer’s Assistant tool and Debugger. There is also integration with Notepad++ for syntax highlighting also integration with the plugging snippets plus adds snippets and auto completion.

DP2 is a database driven application so naturally KPL has amazing tools for reading and writing data to the database. For what I have seen KPL is an Object Oriented Language, there is a long list of classes but most of the scripting that a user will be doing is based on the use of functions.

There is a great number of built-in functions for managing orders, images, packages and other production related work. Also, since Version 14 there is a very powerful Hooks system to alter the interface without having to change core DP2 files, this is a great way to avoid having your code being wiped out when a new version is installed.

There is a lot more to be said about KPL and DP2, you can create UIs using Html, JS and CSS, there is a built in Web server for receiving commands and there is also way to insert KPL scripts from other applications through the use of a hotfolder. There is robust printer integration, great queue management and print job organization. I will be talking more about this things on future articles as I work and discover more on the matter.

It is also important to note that the programming team at Kodak is filled with great, helpful people that will answer most of your questions almost immediately over email. And most of the changes in DP2 are driven by customer feedback.

  1. A coworker stored production assets in Dropbox. Chaos ensued.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.