View Single Post
Old 05-08-2020, 04:06 PM   #20
Shohreh
Addict
Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.
 
Posts: 207
Karma: 304158
Join Date: Jan 2016
Location: France
Device: none
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
Shohreh is offline   Reply With Quote