我正在尝试使用Pandoc将pdf转换为html。我安装了pandoc二进制文件,添加了环境变量path,然后使用
import pypandoc
import os
os.environ.setdefault('PYPANDOC_PANDOC', 'C://Program Files//Pandoc//pandoc.exe')
file_path = r"D:/46580375_1593783098922.pdf"
output = pypandoc.convert_file("46580375_1593783098922.pdf", to='html', outputfile= 'test.html')它给了我一个错误:
RuntimeError: Invalid input format! Got "pdf" but expected one of
these: commonmark, creole, csv, docbook, docx, dokuwiki, epub, fb2,
gfm, haddock, html, ipynb, jats, jira, json, latex, man, markdown,
markdown_github, markdown_mmd, markdown_phpextra, markdown_strict,
mediawiki, muse, native, odt, opml, org, rst, t2t, textile, tikiwiki,
twiki, vimwiki我遗漏了什么?
发布于 2020-08-02 19:05:10
正如错误所说,你不能通过 pandoc.将转换成
https://stackoverflow.com/questions/63215209
复制相似问题