Index pdf annotations separately under field name annotation. Add annot, pdfannot and pa aliases.

This commit is contained in:
Jean-Francois Dockes
2020-10-12 10:05:38 +02:00
parent f60851e935
commit 25eda37bc9
4 changed files with 35 additions and 1 deletions
+4
View File
@@ -443,13 +443,17 @@ class PDFExtractor:
#self.em.rclog("Annotations: %s" % abypage)
pagevec = html.split(b"\f")
html = b""
annotsfield = b""
pagenum = 1
for page in pagevec:
html += page
if pagenum in abypage:
html += abypage[pagenum].encode('utf-8')
annotsfield += abypage[pagenum].encode('utf-8') + b" - "
html += b"\f"
pagenum += 1
if annotsfield:
self.em.setfield("pdfannot", annotsfield)
return html
def _selfdoc(self):
+4 -1
View File
@@ -71,7 +71,7 @@ rclUnsplitFN = XSFS
xapyear = Y
recipient = XTO
rclbes = XB ; noterms = 1
annotation = XA
[values]
###########
@@ -106,6 +106,7 @@ keywords=
rclaptg=
rclbes=
recipient=
annotation=
[aliases]
##########################
@@ -132,6 +133,7 @@ keywords = keyword xesam:keyword tag tags dc:subject xesam:subject \
mtype = mime mimetype xesam:mimetype contenttype xesam:contenttype dc:format
recipient = to xesam:recipient
url = dc:identifier xesam:url
annotation = pdfannot
##################
# The queryaliases section defines aliases which are used exclusively at
@@ -140,6 +142,7 @@ url = dc:identifier xesam:url
[queryaliases]
filename = fn
containerfilename = cfn
annotation = annot pa
[xattrtofields]
######################