I think there is an error in readDocument($filename). Header formatting is not cleared in the while loop. After it is set once, i will be set in all next paragraphs too.
I've added $formatting['header'] = 0; on line 452, before preg_match and it fixed it for me.
Also it is language dependent. In polish it is Nagwek1 instead of Heading1 and so on.
supportad4 - 2024-03-23 11:31:00 - In reply to message 1 from Maksym Chocieszy?ski
You saved my life dear friend! Thanks for the correction. This class was working fine, but that repeated heading error was rendering it useless. You fixed it! Many thanks!