#9 Convert scanned notes to .xoj

open
nobody
None
5
2013-04-17
2007-11-07
taternik
No

Not really a patch, but perhaps somebody finds it useful.

I have a bunch of hand-written lecture notes. I decided
to scan them and convert scanned images to xoj format,
so I could edit them with Xournal.

I wrote a script which does exactly this. It uses
autotrace to convert bitmaps to vector form, massages
the output using pstoedit (replacing curves by linear paths), and finally writes .xoj file.

Please see README and TUTORIAL files.

If you need to scan your paper notes quickly using
a scanner with document feeder and using the command
line without fiddling with GUI, read my tutorial
posted here:
http://forums.xandros.com/viewtopic.php?t=18865

Discussion

  • taternik

    taternik - 2007-11-07

    bitmap2xoj script

     
  • Comment has been marked as spam. 
    Undo

    You can see all pending comments posted by this user  here

    Anonymous

    Anonymous - 2011-12-20

    This patch sounds fantastic, but as of 2011-12-20, the 'eps2xoj' program does not produce any output. Has the .xoj format changed in the last four years? Or perhaps the output of pstoedit? Or perl? Not sure where the problem lies, but an update to this script would be much appreciated.

     
  • SWSW

    SWSW - 2013-04-17

    I scan with gscan2pdf (300dpi/black-white) and save as .png. Then bitmap2xoj works fantastically! If I save as a .pdf file and call bitmap2xoj on it I only get an empty xoj file. However converting the pdf file to a png with the following command allows me to call bitmap2xoj on the resulting png again:

    convert -density 300 -trim NAME.pdf -quality 100 -sharpen 0x1.0 NAME.png

    This makes it possible to write a shell-script converting existing (as pdf) scanned notes to xoj files using convert, bitmap2xoj and combinexoj.

    One important remark: bitmap2xoj does not allow spaces in file names/pathes!

    Thank you for this wonderful patch!

     
    • SWSW

      SWSW - 2015-07-14

      For everybody interested in converting scanned notes to Xournal (xoj) files. It still works:

      Some time ago I wrote a small bash wrapper script that uses taternik's scripts to automate the process for multi-page handwritten notes.

      I use it for notes scanned with gscan2pdf (at 300dpi, monochrome, A4 paper). But it also works for other PDF documents like for example Latex generated PDFs (looks funny ;-) )

      I have attached my script to this mail. Taternik's work is included.

      Installation is simple:
      1.) install necessary packages: autotrace pstoedit imagemagick readlink
      2.) unpack anywhere
      3.) (optionally: Add pdf2xoj to your PATH variable, for example by creating a symlink in ~/bin under Ubuntu)
      4.) use:
      pdf2xoj /path/to/handwritten_notes.pdf

      The script allows some parameters which should make it possible to adapt to different paper sizes (x,y parameters), scan density (d parameter), scaling and line width (s, l parameters). You can also change the default values in the script itself. Experiment!

      Conversion takes some time, even for small (one-page) documents. But after a minute or so a xoj file should appear in the same directory.

      Feel free to use, experiment or even modify/improve/rewrite
      it. If you do the latter, please share your results!

       
      Last edit: SWSW 2015-07-14

Log in to post a comment.