Hi hanche,
The
code published by iRex contains a lot of information about the format/content of the metadata.db files. For Xournal I also had to look into the format of the metadata.db files to be able to import the annotations made with the native DR application into Xournal. I also used the code from thomega to better understand the structure. Also take a look at the code in: Sources\1.7\iRex\libs\erscribble\test.
I attached the source file that contains the code to do the import. Xournal is using a GnomeCanvas with 72DPI, so you will see that the coordinates are being converted from 160 DPI. The strange thing is that I had to use some kind of multiplication factor (1-1/16).
The code uses the libermetadb from iRex, this library is a wrapper around the sqlite3 library and has the 'knowledge' of the format of the blob. You can port the library to the PC or copy only the code you need.
Please let me know if you have more questions.