GitBook 导出 PDF 时报错:EbookError: Error during ebook generation: 'ebook-convert' is not recognized as an internal or external command, operable program or batch file.
D:\>gitbook pdf
info: 7 plugins are installed
info: 6 explicitly listed
info: loading plugin "highlight"... OK
info: loading plugin "search"... OK
info: loading plugin "lunr"... OK
info: loading plugin "sharing"... OK
info: loading plugin "fontsettings"... OK
info: loading plugin "theme-default"... OK
info: found 52 pages
info: found 171 asset files
EbookError: Error during ebook generation: 'ebook-convert' is not recognized as an internal or external command,
operable program or batch file.
其实问题就是因为你没有安装calibre或安装了calibre但是没有配置环境变量导致转换PDF失败,默认安装calibre会自动加入环境变量。calibre 的下载地址: https://calibre-ebook.com/download_windows64
安装完成后就可以正常转换成PDF文件了。
关注公众号「Python之禅」,回复「1024」免费获取Python资源