Thread: PRS-600 prs-600 notes to printing
View Single Post
Old 12-18-2009, 03:34 AM   #37
computermacgyver
Junior Member
computermacgyver began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Dec 2009
Device: Sony Reader Touch
Works for Touch Edition too

Thanks, cedricp, for the script. It works for me on the Touch Edition too. I just had to update the two directory locations

Changed:
svgdir = self.topdir + "/data/markup/" + self.path
To:
svgdir = self.topdir + "/Sony Reader/markup/" + self.path

and
self.dom = xml.dom.minidom.parse(self.topdir+\
"database/cacheExt.xml")
to
self.dom = xml.dom.minidom.parse(self.topdir+\
"/Sony Reader/database/cacheExt.xml")

. I would really love to get highlights to extract. I've played with the pdfloc tags, and it seems it of some format similar to
#pdfloc(doc_id,page,para,d,char,0,g,1)
where
doc_id document_id? same for all annotations in a document
page page number starting from 0
para paragraph or line? starting from 0, restarting on new page
word word on line, starting at 0
char character starting from 0, restart numbering on new word
0 always 0?
g not sure, perhaps unimportant or related to deleted annotations?
1 always one?

I am unaware of a good PDF library that would allow me to add highlights to a PDF file at a certain page/character location. Does anyone have ideas?

All the best,
Scott
computermacgyver is offline   Reply With Quote