One could probably implement a workaround based on @Doitsu's suggestion relatively easily. Use something like those RUBY elements as suggested and let something like Calibre or Prince spit out a PDF in the right output size. Exactly how much effort that would be, depends mainly on how much Python code from
https://github.com/tmilovanov/wisecreator can be reused as is. It should save a few hours writing the actual NLTK analysis code anyway.