How to increase heap memory in pandoc execution?

前端 未结 1 375
不思量自难忘°
不思量自难忘° 2021-01-23 17:44

I am working on converting docx to epub. Document contains lot of images. When execution of converting, i have error:

 “pandoc.exe: Heap exhausted; Current max         


        
相关标签:
1条回答
  • 2021-01-23 18:33

    You can increase the memory available to pandoc, to say 2048 MB, with:

    pandoc.exe +RTS -M2048
    

    But the underlying problem is probably that Pandoc uses zip-archive to zip the EPUB file. It seems you currently need at least as much memory as the uncompressed EPUB you want to generate (but I'd verify this before filing a bug report there).

    You probably also should scale down your images a bit since 2GB seems rather excessive for an e-book (even if it's a bit smaller when compressed).

    0 讨论(0)
提交回复
热议问题