karuppiah7890 / easy-pdf-merge

An npm module to merge PDFs. https://www.npmjs.com/package/easy-pdf-merge [ CURRENTLY NOT MAINTAINED ]
85 stars 37 forks source link

Exception in thread "main" java.lang.OutOfMemoryError: GC overhead limit exceeded #25

Closed manishrocksag closed 4 years ago

manishrocksag commented 4 years ago

I am trying to merge a large number of pdfs around 250 in one go. And I am getting this error. Is there any way to increase the heap size while running the java jar?

manishrocksag commented 4 years ago

I have got the solution. In the opts argument you can pass the max heap size option. Something like this in the args for merge `{ maxBuffer: 1024 * 1000, maxHeap: '1g' }

karuppiah7890 commented 4 years ago

Thanks @manishrocksag for bringing this up. I realized I didn't ask the contributors to create docs in the README for these features in their PRs. I have added the docs now here - https://github.com/karuppiah7890/easy-pdf-merge#options . I hope it helps someone else facing similar issues in the future