04-11-2010, 11:57 AM | #1 |
Member
Posts: 18
Karma: 100
Join Date: Apr 2010
Location: The Netherlands
Device: iRex DR1000S
|
Convert Irex Notes of new firmware 2.0 BETA
I have created a little application which can convert the .note version to XPS or PDF documents so they can be read on a desktop computer.
The .NET framework 3.5 SP1 is required to run, just extract the RAR file and run. To associate the application with all .note files, you must run it as administrator once. Please let me hear if you find any problems or suggestions. Release 4: - Added test option to merge scribbles on PDF files to PDF files, please let me know if you find any problems! - Added device type option in options menu, depending on this option the note files will be correctly sized to fill the page thanks to Mr. X for the note file. Release 3: - Added the option to export to PDF instead of XPS. Change in options menu. Release 2: - New version where the stroke information is correctly read from the blob field. Release 1: - Initial release Last edited by GodzillaNL; 04-18-2010 at 09:36 AM. Reason: Version 4 attached |
04-12-2010, 03:19 AM | #2 |
Groupie
Posts: 199
Karma: 666
Join Date: Oct 2006
Location: Eindhoven, the Netherlands
Device: iLiad, DR1000S, DR800SG
|
Cool.
The sources for liberscribble are mostly unchanged from v1.0 to v2.0 so it's safe to use them as a starting point to parse the scribble data BLOB. |
Advert | |
|
04-12-2010, 03:59 AM | #3 |
Member
Posts: 18
Karma: 100
Join Date: Apr 2010
Location: The Netherlands
Device: iRex DR1000S
|
Thanks for the information. The only error I think that is causing some missed lines is that the pen size is not retrieved from the blob data, resulting in missed lines (still almost not noticable). The binary data of the blob must contain this somewhere. This is the only thing I haven't figured out yet.
All data is now of the same pen size set default in the application. |
04-12-2010, 05:38 AM | #4 |
Guru
Posts: 999
Karma: 19985
Join Date: Dec 2008
Location: Netherlands
Device: iRex DR1000S
|
Hi GodzillaNL,
I attached a file that I use for xournal to read the annotations, maybe it is helpfull for you. Regards, Marcel. |
04-12-2010, 10:56 AM | #5 |
Addict
Posts: 244
Karma: 124
Join Date: Feb 2010
Device: none
|
Is the note format same as the one used for PDF scribbles?
|
Advert | |
|
04-12-2010, 11:34 AM | #6 |
Member
Posts: 18
Karma: 100
Join Date: Apr 2010
Location: The Netherlands
Device: iRex DR1000S
|
I don't know, I haven't tested this, maybe it is the same. Renaming the metadata.db to *.note will maybe work.
I have created this application because I like the new fast notepad application in the new firmware. I was really missing some export function to the desktop. If the notepad application could support some sort of paper templates it would be superb. Like line paper, 1 cm block paper, etc. |
04-12-2010, 01:18 PM | #7 |
Addict
Posts: 244
Karma: 124
Join Date: Feb 2010
Device: none
|
Well, the metadata.db file is a database file (MySQL Lite?). I am not sure if the access interface to this database file is open or not, but it certainly contains the scribbling data of each PDF file. And if I am correct, the PDF scribble and the note share the same base code, so it is possible to get the scribble data out from the metadata.db file, and merge them into the PDF file, actually that's how the DR800 and DR1000 are currently doing.
|
04-12-2010, 02:12 PM | #8 |
Connoisseur
Posts: 68
Karma: 64
Join Date: Mar 2010
Location: Philadelphia
Device: iRex DR800SG
|
metadata.db is a sqlite3 database. All the code for it is open, see libermetadb. The Scribbles are stored as "blobs" (generic binary data) in the "annotations" table:
Code:
CREATE TABLE annotations ( annotation_id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, annotation_type TEXT NOT NULL, file_id INTEGER NOT NULL, layer TEXT NOT NULL, file_position INTEGER NOT NULL, title TEXT, start_anchor TEXT, end_anchor TEXT, data BLOB ); |
04-12-2010, 02:35 PM | #9 |
Member
Posts: 18
Karma: 100
Join Date: Apr 2010
Location: The Netherlands
Device: iRex DR1000S
|
I know, I read this information. The only problem that still needs to solved is some intepretation errors while reading through the BLOB data. When I have time for this I will have a look, take a look at the problem and see if there are any problems or make suggestions.
|
04-12-2010, 02:47 PM | #10 |
Guru
Posts: 999
Karma: 19985
Join Date: Dec 2008
Location: Netherlands
Device: iRex DR1000S
|
A .note file is also an sqlite database, that contains, among others, the annotations-table that contains the blob with annotation data. Both metadata.db- and .note-files contain the same tables that are relevant for annotations so the annotation specific code can be used either on a metadata.db file or a .note file I guess.
|
04-12-2010, 02:59 PM | #11 |
Guru
Posts: 999
Karma: 19985
Join Date: Dec 2008
Location: Netherlands
Device: iRex DR1000S
|
I had to do simular things when I added the annotation-merge-functionality to xournal. So if it is a specific problem, you can send me a PM, maybe I can help.
|
04-12-2010, 03:28 PM | #12 | |
Member
Posts: 18
Karma: 100
Join Date: Apr 2010
Location: The Netherlands
Device: iRex DR1000S
|
Quote:
When this is fixed, I think of adding some more functions like moving pages in the .note file. Can you explain how I should interpretate the stroke information in the BLOB field? |
|
04-12-2010, 04:42 PM | #13 | |
Guru
Posts: 999
Karma: 19985
Join Date: Dec 2008
Location: Netherlands
Device: iRex DR1000S
|
Quote:
From my notes the interpretation of a very simple blob structure, hope this helps with reading the code and the structure of the blob: 0100 version 00000000 orientation 0000000000000000 page_pixel 0000 page_r 0000 page_g 0000 page_b 00000000 ul_x 00000000 ul_y D7040000 lr_x -> 04d7 DA060000 lr_y -> 06da 02000000 num_strokes -> 2 STOKE: The code also contains the following comment:03000000 color A6838942 zoom <-- float 00000000 layer 00000000 shape 03000000 width -> 3 02000000 points -> 2 POINTS: STROKE:2e000000 x 3a000000 y 00000000 pressure 2e000000 x 3a000000 y 2C5D1600 pressure <-- not sure what to do with this 03000000 color A6838942 zoom <-- float 00000000 layer 00000000 shape 03000000 width 05000000 points POINTS: 30000000 x 44000000 y 00000000 pressure 2f000000 x 45000000 y 58C94000 pressure 30000000 x 45000000 y 58C94000 pressure 31000000 x 45000000 y 58C94000 pressure 2f000000 x 45000000 y 2C5D1600 pressure // Best results gives the following formula where: // points from file are scaled using the zoom factor of the stroke_device // then they are scaled from 'input' DPI (160) to 'output' DPI (72) // for some reason a factor of (1-1/16) is needed to scale all to // the correct resolution (maybe related to margins?) So I also had to 'play' a little bit to get it correct. Hope this helps. |
|
04-13-2010, 02:27 AM | #14 |
Member
Posts: 18
Karma: 100
Join Date: Apr 2010
Location: The Netherlands
Device: iRex DR1000S
|
Thanks, that really helps. I can already see that i made a mistake in parsing the stroke information. I hope I can solve this, this week.
|
04-17-2010, 06:00 AM | #15 |
Member
Posts: 18
Karma: 100
Join Date: Apr 2010
Location: The Netherlands
Device: iRex DR1000S
|
Attached in first post is a new version, now all information is read perfectly from the BLOB field resulting is correct XPS documents.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
IREX DR800SG 2.0 Beta feedback to IREX | sordie | iRex | 25 | 04-12-2010 05:19 PM |
Reference iRex: Notes (Music Sheet and Lines). v1. 28 Feb 2008 | nrapallo | IMP Books | 0 | 02-28-2008 10:15 AM |
Something New: iRex MyScript Notes | Tscherno | iRex | 33 | 05-28-2007 01:56 AM |
iRex needs you to test their iLiad beta software | Alexander Turcic | iRex | 46 | 10-16-2006 06:02 PM |
iRex MyScript Notes | segatang | iRex | 2 | 08-22-2006 10:40 PM |