I have seen that problem before.
My guess is, you're trying to convert from a scanned-based document (PDF?) to the epub format?
Well, I recommend you use
Calibre, the universal swiss army knife of conversion, ebook management, etc.
I won't go into much detail on how to use it as there are tons of articles in this forum on that. I just want to add that the latest (1 year?) version has a heuristic processing capability that you can just turn on, and the PDF to MOBI/EPUB conversion will not have the justification problem you mentioned.
If you still have the PDF version of the document... try it.
Good luck!