Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Sony Reader

Notices

Reply
 
Thread Tools Search this Thread
Old 02-06-2012, 04:58 PM   #1
cadmus
Member
cadmus is on a distinguished road
 
Posts: 23
Karma: 68
Join Date: Jan 2012
Device: none
Scribble on PDF can be exported to PDF - linux system

After many months of looking and bothering you all about how to export highlights, notes or scribbles to a file that is useful (the RTFs that the sony reader software exports was not useful) I found a glimmer of hope:
http://hoheinzollern.wordpress.com/2011/11/27/sony-reader-notes-to-svg-or-pdf/

thanks to Alessandro Bruni for inventing this gem.

I can put python on my PC. But i am guessing this will not work on a windows machine. I figured by posting this some linux users would be able to use it. I am hopeing someone knows how to make this work on my windows xp machine.

Any help is greatly appreciated
Pete
cadmus is offline   Reply With Quote
Old 02-07-2012, 04:22 AM   #2
opitzs
Avid Reader
opitzs can successfully navigate the Paris bus system.opitzs can successfully navigate the Paris bus system.opitzs can successfully navigate the Paris bus system.opitzs can successfully navigate the Paris bus system.opitzs can successfully navigate the Paris bus system.opitzs can successfully navigate the Paris bus system.opitzs can successfully navigate the Paris bus system.opitzs can successfully navigate the Paris bus system.opitzs can successfully navigate the Paris bus system.opitzs can successfully navigate the Paris bus system.opitzs can successfully navigate the Paris bus system.
 
opitzs's Avatar
 
Posts: 161
Karma: 36472
Join Date: Sep 2008
Location: Look for rain, hail and snow...
Device: PRS-505, PRS-600, PRS T1, Kobo Glo
You should be able to do this on windows using cygwin.
This uses "sed", which is part of cygwin, so you shouldn't have to many problems, you just have to replace the "sed" with "c:\cygwin\bin\sed" or something to that effect (depending on where you installed it).

Thank you very much for the link.
opitzs is offline   Reply With Quote
Advert
Old 02-07-2012, 10:20 AM   #3
cadmus
Member
cadmus is on a distinguished road
 
Posts: 23
Karma: 68
Join Date: Jan 2012
Device: none
Ohh. I should have used a different thread title. He made a windows version for me.
cadmus is offline   Reply With Quote
Old 02-17-2012, 03:58 PM   #4
idle
I Do Like Ebooks
idle can extract oil from cheeseidle can extract oil from cheeseidle can extract oil from cheeseidle can extract oil from cheeseidle can extract oil from cheeseidle can extract oil from cheeseidle can extract oil from cheeseidle can extract oil from cheese
 
idle's Avatar
 
Posts: 145
Karma: 1006
Join Date: May 2009
Location: Prague, Czech rep.
Device: Pocketbook Ultra 650
Thumbs up

Thanks for the link, I just tried it and it looks really useful.
idle is offline   Reply With Quote
Old 02-19-2012, 05:00 PM   #5
multiprose
Connoisseur
multiprose can extract oil from cheesemultiprose can extract oil from cheesemultiprose can extract oil from cheesemultiprose can extract oil from cheesemultiprose can extract oil from cheesemultiprose can extract oil from cheesemultiprose can extract oil from cheesemultiprose can extract oil from cheese
 
Posts: 79
Karma: 1068
Join Date: Nov 2011
Device: kindle
how are you liking it cadmus? i haven't had time to try it but i'll take a look soon.
multiprose is offline   Reply With Quote
Advert
Old 02-20-2012, 11:13 AM   #6
cadmus
Member
cadmus is on a distinguished road
 
Posts: 23
Karma: 68
Join Date: Jan 2012
Device: none
Quote:
Originally Posted by multiprose View Post
how are you liking it cadmus? i haven't had time to try it but i'll take a look soon.
I just got the T1 this weekend and I have not tried to retreive the scribbles yet. I am eager to hear how it worked for others.

Looking at calibre it seems to be very python oriented plugins. I wonder if this could be made to work under a Calibre Gui.

Pete
cadmus is offline   Reply With Quote
Old 02-20-2012, 11:15 AM   #7
cadmus
Member
cadmus is on a distinguished road
 
Posts: 23
Karma: 68
Join Date: Jan 2012
Device: none
Quote:
Originally Posted by idle View Post
Thanks for the link, I just tried it and it looks really useful.
Great. Can you send examples of what the output pdf looks like? (multipage preferably) Is the scribble vector or raster image?
cadmus is offline   Reply With Quote
Old 02-20-2012, 04:31 PM   #8
taos
Connoisseur
taos can tame squirrels without the assistance of a chair or a whip.taos can tame squirrels without the assistance of a chair or a whip.taos can tame squirrels without the assistance of a chair or a whip.taos can tame squirrels without the assistance of a chair or a whip.taos can tame squirrels without the assistance of a chair or a whip.taos can tame squirrels without the assistance of a chair or a whip.taos can tame squirrels without the assistance of a chair or a whip.taos can tame squirrels without the assistance of a chair or a whip.taos can tame squirrels without the assistance of a chair or a whip.taos can tame squirrels without the assistance of a chair or a whip.taos can tame squirrels without the assistance of a chair or a whip.
 
Posts: 90
Karma: 11069
Join Date: Feb 2012
Device: Sony PRS-T1, Kobo Glo HD
After lurking around this great forum for a couple of months and being inspired by a number of great ideas, I decided to share some of my findings regarding the export and embedding of hand-written annotations (so far, I've only played with simple pdf-files).

For my first tests, I decided to stick with Windows as operating system and tried to avoid to install a lot of additional software.
Already on my computer:
LibreOffice (for its "export to pdf" functionality), PDF24 (a tool to merge pdf files, something similar should work too), Inkscape (vector graphics editing)
Additional installs:
SQLiteSpy (reading of Sony's books.db), NoteToSvg

What I tried:
For testing purposes I made a simple pdf file (Scribble Test - original.pdf) with LibreOffice Writer and transferred it to the PRS-T1. I added a few free-hand annotations (see Click image for larger version

Name:	Scan Page 1.jpg
Views:	327
Size:	39.5 KB
ID:	82827 and Click image for larger version

Name:	Scan Page 2.jpg
Views:	331
Size:	42.6 KB
ID:	82828) to the file on the reader and then connected the reader again with my computer.
With SQLiteSpy I looked for the id of the free-hand annotations in books.db and exported the respective files in /Sony_Reader/database/cache/books/BOOK_ID/markup with NoteToSVG.
Then I opened both the first page of the pdf file and the svg file with Inkscape, grouped all elements of the svg and copied the illustration to the window with the pdf (for some reason I had to resize the graphic, so it might be a good idea to mark two corners when annotating on the reader to facilitate aligning). I saved the file as pdf and did the same with the second page.
Both pages were merged with PDF24. As you can see, the resulting pdf file (Scribble Test - annotated pages.pdf) doesn't look too bad - simple text is fine but there are some obvious problems with equations (that were not properly imported by Inkscape). However, it's too much time and effort to do this for complete textbooks or even epubs.
taos is offline   Reply With Quote
Old 02-20-2012, 04:43 PM   #9
cadmus
Member
cadmus is on a distinguished road
 
Posts: 23
Karma: 68
Join Date: Jan 2012
Device: none
Well done. That is exactly what i was hoping for. Thanks for the great examples and the help.

You said "However, it's too much time and effort to do this for complete textbooks or even epubs." yeah but it is possible and i am guessing if someone can make a script it can be done in bulk.

I will likley have questions for you later. THANKS. well done.
cadmus is offline   Reply With Quote
Old 02-20-2012, 09:34 PM   #10
cadmus
Member
cadmus is on a distinguished road
 
Posts: 23
Karma: 68
Join Date: Jan 2012
Device: none
When you did this was the scribble from page one a different file than page 2? So if one were to do this on say a 20 page PDF, and they only marked some of the pages... it could become difficult figuring out what scribble was for what page, huh?
cadmus is offline   Reply With Quote
Old 02-21-2012, 01:23 AM   #11
taos
Connoisseur
taos can tame squirrels without the assistance of a chair or a whip.taos can tame squirrels without the assistance of a chair or a whip.taos can tame squirrels without the assistance of a chair or a whip.taos can tame squirrels without the assistance of a chair or a whip.taos can tame squirrels without the assistance of a chair or a whip.taos can tame squirrels without the assistance of a chair or a whip.taos can tame squirrels without the assistance of a chair or a whip.taos can tame squirrels without the assistance of a chair or a whip.taos can tame squirrels without the assistance of a chair or a whip.taos can tame squirrels without the assistance of a chair or a whip.taos can tame squirrels without the assistance of a chair or a whip.
 
Posts: 90
Karma: 11069
Join Date: Feb 2012
Device: Sony PRS-T1, Kobo Glo HD
I suppose it's not too bad: For every page with scribbles there are two files, a pseudo svg (input file for NoteToSvg) and a minuscule thumbnail png file with the same name (but different extension) in Sony_Reader/database/cache/books/CONTENT_ID/markup. The file name corresponds to the entries in columns "svg_file" and "thumbnail" of table "freehand" in PRS-T1's books.db (Sony_Reader/database/books.db). Thankfully, there is also a "page" column (cell data shows "0.9999" for page 1 and "1.9999" for page 2). IIRC from playing around with text annotations in epubs, this entry is always x - 0.0001 for page x - so not too difficult to find...
BTW, "content_id" in "freehand" table corresponds to "_id" of "books" table where you can find "title" and "author" of your annotated pdf file.

Last edited by taos; 02-21-2012 at 01:33 AM. Reason: Additional information
taos is offline   Reply With Quote
Old 02-21-2012, 03:33 AM   #12
idle
I Do Like Ebooks
idle can extract oil from cheeseidle can extract oil from cheeseidle can extract oil from cheeseidle can extract oil from cheeseidle can extract oil from cheeseidle can extract oil from cheeseidle can extract oil from cheeseidle can extract oil from cheese
 
idle's Avatar
 
Posts: 145
Karma: 1006
Join Date: May 2009
Location: Prague, Czech rep.
Device: Pocketbook Ultra 650
For Linux users, things are much easier with this tool linked in the discussion. When set up properly (it needs python and some libraries), it does all the merging by itself. You just run the script (from the command line - there's no GUI, but it's so simple there's no need) and it lists all the annotated PDFs in the reader, you choose one and it saves the merged PDF where you want it. Neat.

I haven't done any annotating yet, just what I did for the sake of trying this thing out, but I expect I'll have an opportunity soon.

Quote:
Originally Posted by cadmus View Post
Looking at calibre it seems to be very python oriented plugins. I wonder if this could be made to work under a Calibre Gui.
That would be even neater.
idle is offline   Reply With Quote
Old 02-21-2012, 05:10 AM   #13
rubentje1991
Enthusiast
rubentje1991 began at the beginning.
 
Posts: 33
Karma: 10
Join Date: Jan 2012
Device: Sony PRS-T1
Interesting... this way my annotations become much more useful...

When I find some time, I'll try this on my linux box
rubentje1991 is offline   Reply With Quote
Old 02-21-2012, 08:46 AM   #14
taos
Connoisseur
taos can tame squirrels without the assistance of a chair or a whip.taos can tame squirrels without the assistance of a chair or a whip.taos can tame squirrels without the assistance of a chair or a whip.taos can tame squirrels without the assistance of a chair or a whip.taos can tame squirrels without the assistance of a chair or a whip.taos can tame squirrels without the assistance of a chair or a whip.taos can tame squirrels without the assistance of a chair or a whip.taos can tame squirrels without the assistance of a chair or a whip.taos can tame squirrels without the assistance of a chair or a whip.taos can tame squirrels without the assistance of a chair or a whip.taos can tame squirrels without the assistance of a chair or a whip.
 
Posts: 90
Karma: 11069
Join Date: Feb 2012
Device: Sony PRS-T1, Kobo Glo HD
Quote:
Originally Posted by idle View Post
For Linux users, things are much easier with this tool linked in the discussion.
That, of course, is true. On my linux boxes python and most (if not all) of the needed libraries are already installed. I played around on Windows as a non-privileged user to mimic the situation with work PCs that are still stuck with Windows XP and where you aren't allowed to install any software (only workaround is to use portable applications - that exist e.g. for LibreOffice or Inkscape). Both NoteToSvg and SQLiteSpy work without installation on these computers. Only problem in this situation might be the print-to-pdf functionality that might require an installed ghostscript version.

A portable version of Calibre supporting the import and embedding of freehand notes would be really convenient.

Last edited by taos; 02-21-2012 at 08:49 AM. Reason: typo
taos is offline   Reply With Quote
Old 02-21-2012, 10:57 PM   #15
multiprose
Connoisseur
multiprose can extract oil from cheesemultiprose can extract oil from cheesemultiprose can extract oil from cheesemultiprose can extract oil from cheesemultiprose can extract oil from cheesemultiprose can extract oil from cheesemultiprose can extract oil from cheesemultiprose can extract oil from cheese
 
Posts: 79
Karma: 1068
Join Date: Nov 2011
Device: kindle
check your inbox =]
multiprose is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Indesign-exported pdf to epub eagles1972 Conversion 0 01-12-2012 12:24 AM
DR800 How to backup PDF annotation/scribble? CoolDragon iRex 4 04-12-2010 10:07 AM
pdf crop linux x3oo PDF 2 03-08-2009 06:50 AM
New PDF scribble merger from iRex Adam B. iRex 1 11-28-2007 01:21 PM
Scribble on non-PDF? nekokami iRex 3 11-13-2006 12:10 PM


All times are GMT -4. The time now is 03:59 PM.


MobileRead.com is a privately owned, operated and funded community.