View Single Post
Old 03-07-2012, 04:57 AM   #447
andyh2000
Avid reader
andyh2000 ought to be getting tired of karma fortunes by now.andyh2000 ought to be getting tired of karma fortunes by now.andyh2000 ought to be getting tired of karma fortunes by now.andyh2000 ought to be getting tired of karma fortunes by now.andyh2000 ought to be getting tired of karma fortunes by now.andyh2000 ought to be getting tired of karma fortunes by now.andyh2000 ought to be getting tired of karma fortunes by now.andyh2000 ought to be getting tired of karma fortunes by now.andyh2000 ought to be getting tired of karma fortunes by now.andyh2000 ought to be getting tired of karma fortunes by now.andyh2000 ought to be getting tired of karma fortunes by now.
 
andyh2000's Avatar
 
Posts: 890
Karma: 6543210
Join Date: Apr 2009
Location: UK
Device: Samsung Galaxy Z Flip 4 / Kindle Paperwhite / TCL Nxtpaper 14
Quote:
Originally Posted by mod186k1 View Post
I'm analyzing the JBC's scribblet files format to implement an plugin for my project named "jCrossSketch". If I succeed, I can convert it in SVG and in Jarnal file format. That's means I can use Jarnal to see PDF+hand writed notes on my PC and generate a unique PDF. I can also use all software of iLiad like the handwriting-to-text (myScriptNotes) and all 3d party software developed for iliad like "Iliad Java Scribble Merger"

I do not know if reverse engineering is legal...
Here's a Python script to create a very simple scribble file with a diagonal line from top right to bottom left. The coordinate origin on the page is at the top left - x increases across the page from left to right and y increases down the page from top to bottom. I've put a few comments in which should show what's going on.

Code:
from io import FileIO
from array import array

of=FileIO('1', 'w')

# Header
of.write(array('B', [0x0c, 0x04, 0x40, 0x06]))

# New linestring - each new linestring starts with this
of.write(array('B', [0xff, 0xff, 0xff, 0xff,     0x00]))

# 1st coord pair -   loX,  hiX,  loY,  hiY,      0x00
of.write(array('B', [0xae, 0x04, 0x00, 0x00,     0x00]))

# 2nd coord pair -   loX,  hiX,  loY,  hiY,      0x00
of.write(array('B', [0x00, 0x00, 0x32, 0x06,     0x00]))

# You can have as many coordinate pairs as you like in a linestring (>=2)
# Next linestring would start with [0xff, 0xff, 0xff, 0xff, 0x00] again

of.close()
Edited to add: As this will probably generate some interest I'll start a new topic with this code.

Andrew

Last edited by andyh2000; 03-07-2012 at 05:12 AM.
andyh2000 is offline   Reply With Quote