brendonh / pyth

Python text markup and conversion
MIT License
89 stars 79 forks source link

problem with reading file.rtf with table inside #48

Open russele7 opened 2 years ago

russele7 commented 2 years ago

Hello! Could you please help.

I have file.rtf with table inside. I need to read text from table. But program do not make any deviding when move from one cell to another inside one row.

Example: Input: Cell 1 : How / Cell 2 : are / Cell 3 : you Output: Howareyou

My code is: from pyth.plugins.rtf15.reader import Rtf15Reader from pyth.plugins.plaintext.writer import PlaintextWriter

doc = Rtf15Reader.read(open('test.rtf', 'rb')) PlaintextWriter.write(doc).getvalue()

Thank you!