Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Conversion

Notices

Reply
 
Thread Tools Search this Thread
Old 04-26-2020, 07:45 AM   #16
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
Is there a way to check which version of poppler Calibre uses?

At this point, the latest is 0.87 from March 28, 2020 : https://poppler.freedesktop.org/

It says that it uses "PDF Input (1.0.0) by Kovid Goyal and John Schember" to convert PDF to HTML.
Shohreh is offline   Reply With Quote
Old 04-26-2020, 07:47 AM   #17
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,349
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
look at sources.json in the calibre source code
kovidgoyal is offline   Reply With Quote
Advert
Old 04-26-2020, 08:03 AM   #18
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
Thank you.

Code:
    {
        "name": "poppler",
        "unix": {
            "filename": "poppler-0.76.1.tar.xz",
            "hash": "sha256:e62cd4053f851eecc4a6aa2b81d739fbab1d67b3c60b31ebac7049483cc617b1",
            "urls": ["https://poppler.freedesktop.org/{filename}"]
        }
    },

    {
        "name": "podofo",
        "unix": {
            "filename": "podofo-0.9.6.tar.gz",
            "hash": "md5:46336fc4c4ce4be814bb5fbb4d918334",
            "urls": ["https://downloads.sourceforge.net/podofo/{filename}"]
        }
    },
https://github.com/kovidgoyal/calibr...y/sources.json
Shohreh is offline   Reply With Quote
Old 04-27-2020, 11:24 AM   #19
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
I had an idea: Considering PDF should display plain text just fine on an e-reader, and only some parts/pages won't because of more complex layout… an easier alternative to trying to use Caliber to convert a PDF into EPUB through poppler, is to use LibreOffice to edit just the pages/parts that don't work, and rebuild a PDF.

1. Save each page as a single PDF:

Code:
qpdf --progress --split-pages infile.pdf %d.pdf
2. In LibreOffice Draw, open and edit each problematic page to replace all nasty parts (remove/rewrite insets and multi-column text, replace tables with just screenshots that fit your e-reader, eg. 768x1024 pixels). While you're at it, use a regex to remove the headers/footers and page numbers

3. Merge all the pages back into a single PDF:

Code:
qpdf --empty --pages *.pdf -- out.pdf
Shohreh is offline   Reply With Quote
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
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Plato, alternative e-book reader (ePUB, PDF, DJVU) for Remarkable Tablet darvin88 More E-Book Readers 6 07-20-2018 05:16 PM
iPad Alternative to GoodReader? (PDF on iOS) lo-fi Apple Devices 12 04-19-2017 01:17 AM
epub → pdf conversion: remove a section dma_k Conversion 8 08-31-2016 05:40 PM
Creating epub/kepub books (docx→epub/kepub via MS Word→Calibre) SJC-Caron ePub 18 04-21-2016 11:10 AM
Calibre and pdf to epub JCSullivan Calibre 3 05-26-2010 09:46 PM


All times are GMT -4. The time now is 08:50 PM.


MobileRead.com is a privately owned, operated and funded community.