Skip to content

Commit

Permalink
Text in <strong> tags will be inserted in pdf
Browse files Browse the repository at this point in the history
  • Loading branch information
tristelune1 committed Dec 26, 2014
1 parent 33b5725 commit e7618d2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions HocrConverter.py
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,8 @@ def to_pdf(self, imageFileNames, outFileName, fontname="Courier", fontsize=12, w
textContent = unicodedata.normalize("NFC",unicode(" ".join([elem for elem in map((lambda text: text.strip()),line.itertext()) if len(elem) > 0])))
else:
textContent = line.text
if ( textContent == None ):
textContent = line.findtext("%sstrong"%(self.xmlns))
if ( textContent == None ):
textContent = u""
textContent = textContent.rstrip()
Expand Down

0 comments on commit e7618d2

Please sign in to comment.