layout: allow names beginning with /i0123 for now

Showed up in GGastro2.pdf. Need to check if this pattern has valid
Unicode mappings but allow for now.
This commit is contained in:
James R. Barlow
2018-10-29 14:45:59 -07:00
parent 05aa43c856
commit d71fd089cb
+1 -1
View File
@@ -40,7 +40,7 @@ from ..exceptions import EncryptedPdfError
# characters with no corresponding Unicode entry. These can be subsetted fonts
# or symbolic fonts. There seems to be no way to map /g123 fonts to Unicode,
# barring a ToUnicode data structure.
pdfminer.encodingdb.STRIP_NAME = re.compile(r'[^g][0-9]+')
pdfminer.encodingdb.STRIP_NAME = re.compile(r'(?![g])([0-9]+)')
class LTStateAwareChar(LTChar):
"""A subclass of LTChar that tracks text render mode at time of drawing"""