For others' benefit: The easiest solution I found is to not bother trying to convert a PDF to EPUB, even with Calibre's courageous attempt to clean up the HTML generated by Poppler's pdftohtml.
Since probably all e-readers sold these days can read PDF somehow, first try copying the original, and see if it looks good enough, with or without playing with settings on the reader.
If it doesn't look good enough, an easy thing to try, is to run it through
k2pdfopt, which will massage the PDF specifically for use on an e-reader.
Using the following command and disabling "Reflow text" on my reader makes for a pretty good output, even though it'll never be as good as a native EPUB:
Code:
#Fit width, portrait, 0.2 inch margin
k2pdfopt -mode fw -ls- -om 0.2 input.pdf