使用 Pandoc 将 EPUB 转换为 PDF

MYa*_*208 8 latex pdf convert epub pandoc

我想使用 Pandoc 将我的 test.epub 转换为 PDF 格式。我试过(这里给出

pandoc -f epub -t test.epub -o outfile.pdf
Run Code Online (Sandbox Code Playgroud)

这会引发以下错误:

无法从 pdf 生成 pdf 输出

我也尝试了以下命令

pandoc test.epub -f epub -t latex -s -o my.pdf --latex-engine=xelatex
Run Code Online (Sandbox Code Playgroud)

这会引发以下错误:

--latex-engine has been removed.  Use --pdf-engine instead.
Try pandoc --help for more information.
Run Code Online (Sandbox Code Playgroud)

然后我试过了

pandoc test.epub -f epub -t latex -s -o my.pdf --pdf-engine=xelatex
Run Code Online (Sandbox Code Playgroud)

它将 EPUB 转换为 PDF 格式,但最终输出不是很好。不尊重分页符和其他东西。页数多于实际。非常有效地将 EPUB 转换为 PDF 格式的任何想法。

Kur*_*fle 6

您是否尝试过Pandoc 的最新版本(目前为 v2.5)?
你尝试过玩'--epub-chapter-level=...'数字吗?
您是否尝试过使用'--top-level-division=section'(或...=part...=chapter) 来输出?
您尝试过使用 LuaLaTeX 引擎吗?

潘多克\
  -f epub \
  -t乳胶\
  -o my.pdf \
  --epub-章节级别=1 \
  --pdf-engine=lualatex \
   测试.epub

您是否尝试过像Calibre这样的非 Pandoc 工具?