Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 03-25-2012, 11:52 AM   #1
sjvs
Enthusiast
sjvs began at the beginning.
 
Posts: 25
Karma: 10
Join Date: Mar 2012
Device: Sony PRS-T1
Post [GUI Plugin] Sony PRS-T1 notes (handwriting) exporter

The Sony PRS-T1 notes plugin allows you to export the notes from your Sony PRS-T1 ereader, by merging the notes with the original book/document and creating a new PDF.


Main features of Sony PRS-T1 notes plugin:
  • Create new PDF file: original book/document with handwritten notes correctly positioned on top.
  • Does not rasterise the text and handwriting (like the Sony Reader application does, resulting in an enormous low-quality file): handwriting is an extra (vector-based) layer on top of the original PDF.
  • Supports both (1) merging entire book/document, with a few pages with handwriting and (2) exporting only the pages with handwriting.

Special Notes:
  • Requires Calibre v0.8.34 (Januari 2012) or later.
  • I have received many emails asking whether the plugin supports EPUB books, exporting typed notes, or exporting highlighted pieces of text. This is not the case at the moment: only handwritten notes in PDF books/documents can be exported using this plugin. See this post for more details. Sorry!

Installation procedure:
  • Download the attached zip file
  • Open the preferences dialog ("Change Calibre behaviour"), click on the "Plug-ins" button and click "Load plug-in from file", pointing Calibre at the plugin zipfile.

Paypal donations:
If you find this plugin useful please feel free to show your appreciation.


Version History:
Spoiler:
  • Version 1.1.0 (r1725 - March 31, 2012)
    Fixed bug (PDF files should be opened in "binary" mode under Windows) that caused the plugin to malfunction when using Windows. Tested using Windows and Linux.
  • Version 1.0.0 (March 25, 2012
    First version. Tested on Linux (Ubuntu 11.10), Mac and Windows using formats: A4 (portrait), letter (portrait + landscape). Should work on any media size.
Attached Files
File Type: zip Sony PRS-T1 notes plugin.zip (35.6 KB, 32130 views)

Last edited by sjvs; 04-20-2012 at 07:11 AM. Reason: Clarification
sjvs is offline   Reply With Quote
Old 03-26-2012, 07:04 PM   #2
heidetto
Junior Member
heidetto began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Mar 2012
Device: Sony PRS T1
Hello, thank you for developing the plugin.
When I click on "Create PDF" I get the following error.

calibre, version 0.8.44
ERROR: Unhandled exception: <b>ValueError</b>:invalid literal for int() with base 10: ''

Traceback (most recent call last):
File "calibre_plugins.prst1_notes.main", line 173, in createPdf
File "calibre_plugins.prst1_notes.PRST1NotesMergeInterf ace", line 22, in __init__
File "calibre_plugins.prst1_notes.PRST1NotesMergeInterf ace", line 81, in initialiseInterface
File "calibre_plugins.prst1_notes.PRST1NotesMerger" , line 195, in getBookNumPages
File "calibre_plugins.prst1_notes.PRST1NotesMerger" , line 34, in getPyPDFBook
File "site-packages\pyPdf\pdf.py", line 279, in __init__
File "site-packages\pyPdf\pdf.py", line 635, in read
File "site-packages\pyPdf\generic.py", line 87, in readObject
File "site-packages\pyPdf\generic.py", line 232, in readFromStream
ValueError: invalid literal for int() with base 10: ''
heidetto is offline   Reply With Quote
 
Enthusiast
Old 03-28-2012, 05:28 AM   #3
sjvs
Enthusiast
sjvs began at the beginning.
 
Posts: 25
Karma: 10
Join Date: Mar 2012
Device: Sony PRS-T1
It looks like pyPdf (the PDF library of Calibre) has problems reading your PDF file. Would it be possible for you to send me the file so I can investigate? I tried it with multiple PDF files, haven't encounter this error message before.

Also: which platform are you on?
sjvs is offline   Reply With Quote
Old 03-28-2012, 09:54 AM   #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: 144
Karma: 1006
Join Date: May 2009
Location: Prague, Czech rep.
Device: Hanlin V3, Sony PRS-T1
Hello, I tried this plugin and got a different error:

calibre, version 0.8.44
ERROR: Unhandled exception: <b>PdfReadError</b>:EOF marker not found

Traceback (most recent call last):
File "calibre_plugins.prst1_notes.main", line 173, in createPdf
File "calibre_plugins.prst1_notes.PRST1NotesMergeInterf ace", line 22, in __init__
File "calibre_plugins.prst1_notes.PRST1NotesMergeInterf ace", line 81, in initialiseInterface
File "calibre_plugins.prst1_notes.PRST1NotesMerger" , line 195, in getBookNumPages
File "calibre_plugins.prst1_notes.PRST1NotesMerger" , line 34, in getPyPDFBook
File "site-packages\pyPdf\pdf.py", line 279, in __init__
File "site-packages\pyPdf\pdf.py", line 610, in read
PdfReadError: EOF marker not found

Previously, the same happened with Calibre 0.8.40. It's on Windows XP.

My test file itself is pretty simple (I'm attaching it). Apart from that, I tried two other files that I cannot share; one gave me the same result as above, the other one got past this point and seems to be merging, but it has been running for maybe 20 minutes, is that normal (about 60 small pages sized for my reader, 25 of them with notes)?
Attached Files
File Type: pdf test.pdf (13.0 KB, 202 views)
idle is offline   Reply With Quote
Old 03-28-2012, 10:00 AM   #5
sjvs
Enthusiast
sjvs began at the beginning.
 
Posts: 25
Karma: 10
Join Date: Mar 2012
Device: Sony PRS-T1
Are you using an SD card in your PRS-T1? If so: does the merging work for books that are on the internal memory of your e-reader? Unfortunately, I was unable to test it with an SD card.

I'll publish an update soon which should provide some more information regarding the things going on in there. Hopefully, that'll make clear what the problem is exactly.

Regarding the merge time: no, it should be very fast. I tested it with 500 A4 pages (about 15 megabytes), completed within at most 30 seconds. How many pages contain handwritten notes? How big is the original book (in megabytes)?
sjvs is offline   Reply With Quote
Old 03-28-2012, 10:13 AM   #6
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: 144
Karma: 1006
Join Date: May 2009
Location: Prague, Czech rep.
Device: Hanlin V3, Sony PRS-T1
There's an SD card in my reader but I'm not using it - the file is in the internal memory. The size is about 230 kB, notes are on 25 pages according to the plugin.

I might try it again at home on Debian, to see if it's a Windows thing or not.
idle is offline   Reply With Quote
Old 03-28-2012, 10:15 AM   #7
sjvs
Enthusiast
sjvs began at the beginning.
 
Posts: 25
Karma: 10
Join Date: Mar 2012
Device: Sony PRS-T1
Thanks, let me know whether that works or not. I'll do some additional testing using Windows as well.
sjvs is offline   Reply With Quote
Old 03-28-2012, 01:47 PM   #8
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: 144
Karma: 1006
Join Date: May 2009
Location: Prague, Czech rep.
Device: Hanlin V3, Sony PRS-T1
OK, now I tried it at home with the same files and everything works fine. (Debian, Calibre version 0.8.41)

So I guess the trouble will be Windows-related. Now that I know how it's supposed to work I'm adding that the moment things went wrong, in both cases, was at the moment I selected a file to be merged and clicked the button, before the other dialog is displayed (the one where I can choose whether to merge the whole file or just the annotated pages - I didn't even know there was one).
idle is offline   Reply With Quote
Old 03-30-2012, 11:34 AM   #9
heidetto
Junior Member
heidetto began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Mar 2012
Device: Sony PRS T1
Thanks! My OS is Vista.
heidetto is offline   Reply With Quote
Old 03-31-2012, 05:40 PM   #10
sjvs
Enthusiast
sjvs began at the beginning.
 
Posts: 25
Karma: 10
Join Date: Mar 2012
Device: Sony PRS-T1
I'm not used to programming under Windows - it took me an entire evening to discover that there's a special flag to open files in "binary" mode under Windows. This flag was missing in the plugin code, which confused PyPDF - the PDF reading/writing library.

A new version of the plugin is almost ready. It definitely works under Windows, I should be able to test it under Linux later tonight. Watch this space!
sjvs is offline   Reply With Quote
Old 03-31-2012, 05:53 PM   #11
sjvs
Enthusiast
sjvs began at the beginning.
 
Posts: 25
Karma: 10
Join Date: Mar 2012
Device: Sony PRS-T1
New version uploaded! The first post of this thread has been updated with a new file and version history. Please let me know whether or not this works for you.
sjvs is offline   Reply With Quote
Old 04-05-2012, 11:10 AM   #12
heidetto
Junior Member
heidetto began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Mar 2012
Device: Sony PRS T1
It does work like a charm! Thanks.
heidetto is offline   Reply With Quote
Old 04-06-2012, 05:15 AM   #13
hopkinsenglish
Connoisseur
hopkinsenglish began at the beginning.
 
hopkinsenglish's Avatar
 
Posts: 62
Karma: 10
Join Date: Sep 2010
Location: Indianapolis, IN
Device: Sony PRS-350
How do I actually use the plugin after successfully installing it?
hopkinsenglish is offline   Reply With Quote
Old 04-06-2012, 06:16 AM   #14
heidetto
Junior Member
heidetto began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Mar 2012
Device: Sony PRS T1
On the bar on the top there should be a button called "Sony PRS-T1 Notes".
heidetto is offline   Reply With Quote
Old 04-09-2012, 04:24 PM   #15
power3d
Junior Member
power3d began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Apr 2012
Device: Sony PRS-T1
Thank you very much for this plugin.
It seems like it only works for PDFs that are stored in the main memory.
power3d is offline   Reply With Quote
Reply

Tags
handwriting, notes, prs-t1, prst1, sony

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[GUI Plugin] Copy book covers as Standby images (Sony/PocketBook/Kindle/Nook) jackie_w Plugins 113 07-18-2014 06:42 PM
PRS-T1 PRS-T1 Annotations Exporter Yoths Sony Reader 47 08-15-2013 03:34 PM
Developing plugin to process notes from Sony PRS-T1: no module named sjvs Development 19 03-25-2012 11:53 AM
[GUI Plugin] Manage Sony x50 Reader Book List kpw Plugins 159 01-07-2012 02:44 PM
[GUI Plugin] Plugin Updater **Deprecated** kiwidude Plugins 159 06-19-2011 12:27 PM


All times are GMT -4. The time now is 05:16 AM.


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