Score:1

How can I convert this epub file to pdf?

us flag
Tim

I have tried Calibre to convert an epub file to pdf, following https://askubuntu.com/a/299752/

ebook-convert /tmp/1.epub 1.pdf

but it fails with many errors.

$ ebook-convert --version
..ebook-convert-wrapped-wrapped (calibre 5.42.0)
Created by: Kovid Goyal <[email protected]>

I have also tried pandoc, following both https://askubuntu.com/a/798129/

$ pandoc -f epub -t pdf /tmp/1.epub -o 1.pdf
Error producing PDF.
! LaTeX Error: Unicode character − (U+2212)
               not set up for use with LaTeX.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.12696 ...lationship between two things (from −

and https://askubuntu.com/a/954582/

$ pandoc -s -t latex --toc --chapters --latex-engine=lualatex /tmp/1.epub -o 1.pdf
--chapters has been removed. Use --top-level-division=chapter instead.
--latex-engine has been removed.  Use --pdf-engine instead.
Try pandoc --help for more information.

$ pandoc -s -t latex --toc --top-level-division=chapter --pdf-engine=lualatex /tmp/1.epub -o 1.pdf
Error producing PDF.
! LaTeX Error: Not in outer par mode.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.15624 \end{figure}}

Mine is:

$ pandoc --version
pandoc 2.17.1.1
Compiled with pandoc-types 1.22.2, texmath 0.12.4, skylighting 0.12.3,
citeproc 0.6.0.1, ipynb 0.2
User data directory: /home/t/.local/share/pandoc
Copyright (C) 2006-2022 John MacFarlane. Web:  https://pandoc.org
This is free software; see the source for copying conditions. There is no
warranty, not even for merchantability or fitness for a particular purpose.

Have I used both tools correctly? How would you convert the epub file to pdf?

andrew.46 avatar
in flag
So the input file converted (with multiple *warning* messages) via both gui and command line of Calibre 6.15.1.
Tim avatar
us flag
Tim
thanks, @andrew.46. is it because I haven't updated Calibre since its 5.42 [03 May, 2022]?
andrew.46 avatar
in flag
Could be, you may have to follow Kovid's binary [Linux install](https://calibre-ebook.com/download_linux) directions...
andrew.46 avatar
in flag
Newer version worked?
Tim avatar
us flag
Tim
I can't install the newer version right now.
vanadium avatar
cn flag
Do you have the licence to provide this ebook publicly? If not, then please delete the link, although then the question may become unanswerable because the issue indeed may be with the file.
andrew.46 avatar
in flag
Sigh... I don't know anything about ?US copyright law but I have removed the link to be sure...
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.