Fixing encode/decode issues for python3.
This commit is contained in:
@@ -69,7 +69,7 @@ def parse_lt_objects(lt_objects):
|
|||||||
for lt_object in lt_objects:
|
for lt_object in lt_objects:
|
||||||
if isinstance(lt_object, LTTextBox) or isinstance(lt_object, LTTextLine):
|
if isinstance(lt_object, LTTextBox) or isinstance(lt_object, LTTextLine):
|
||||||
# text
|
# text
|
||||||
text_content.append(lt_object.get_text().encode('utf-8'))
|
text_content.append(lt_object.get_text())
|
||||||
elif isinstance(lt_object, LTFigure):
|
elif isinstance(lt_object, LTFigure):
|
||||||
# LTFigure objects are containers for other LT* objects, so recurse through the children
|
# LTFigure objects are containers for other LT* objects, so recurse through the children
|
||||||
text_content.append(parse_lt_objects(lt_object._objs)) # pylint: disable=protected-access
|
text_content.append(parse_lt_objects(lt_object._objs)) # pylint: disable=protected-access
|
||||||
|
|||||||
Reference in New Issue
Block a user