Wait! Have you tried sumatra?
It is/was an app on Windows that handles a pretty wide range of text files. Iirc, it did a decent job with some manuals I had in pdf and ebup formats. I can't promise it'll render right, just that it's an option that worked for a similar use case a few years ago
Edit: I didn't think of it earlier because it's windows based, but it might be doable on Linux nowadays https://sumatrapdf.org/