cycomanic / Menextract2pdf

Extract Mendely annotations to PDF FIles
GNU General Public License v3.0
35 stars 15 forks source link

Lost highlight in 1st page #1

Closed Xunius closed 8 years ago

Xunius commented 8 years ago

Hi, I believe there is a bug in the file menextract2pdf.py in line 101-107: The annotations dict firstly takes highlights (line 151), then takes in notes (line 152). Suppose one pdf has both highlights and notes in its 1st page, then pth is in results, but results[pth] has only 'highlights' but not 'notes', in such cases the line results[pth][pg] = {'notes': [note]} will overwrite the sub-dict and renders the highlight records lost.