Since I had a Linux host available, I went around that issue with Windows and shell expansion.

pandoc -f html -t epub3 -o output.epub input.html


pandoc ran successfully (no error message), but the EPUB can't be opened in a Windows GUI application that supports EPUB files ("Error loading file.epub"). Likewise, I can't open the file after changing its extension from EPUB to ZIP.

Here's the input files (HTML + PNGs):

https://we.tl/t-5EeGXML1rb

Do I need extra options in the command line?

Le mercredi 22 avril 2020 11:55:49 UTC+2, Heck Lennon a écrit :
Thanks everyone for the infos!

Le mercredi 22 avril 2020 01:25:21 UTC+2, Kolen Cheung a écrit :
A side note, since your goal is to convert from PDF to ePub, you probably will have better results using other tools. Eg I know it can be converted to docx, and then from docx to ePub. There may he tool that can help you convert that directly too. Essentially for the tools you choose, you’d want to choose one preserving most information. And since pandoc focuses many on the structure of the document, much other information would be lost. The choice of tool also depends on which ones you’re comfortable with, Eg the PDF to docx I mentioned probably can be done by Adobe Acrobat and MS Word. But they are proprietary and difficult to run from the command line.

In your case, since you have a tool preconverted them to html already, html to ePub can be done better by some other engines (since the 2 are closely related.) may be you can try Calibre which also have a cli.

--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/b3218bbb-9846-4e52-b201-7e4a1b8b09d6%40googlegroups.com.