Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pdf Generation for large html file takes too long #123

Open
mohammedfariz opened this issue Feb 13, 2019 · 2 comments
Open

Pdf Generation for large html file takes too long #123

mohammedfariz opened this issue Feb 13, 2019 · 2 comments

Comments

@mohammedfariz
Copy link

mohammedfariz commented Feb 13, 2019

I am using wkhtmltopdf for generating pdf file from html file with Node JS. If the html file is too large (In my case its about 55 MB), then the pdf generation part is taking too long (More than 10 minutes)

Is there any way to optimize the time ?

My system Configuration is :
OS : Windows 10 64 bit
Ram : 8 GB
Processor : i5

@PyroSA
Copy link

PyroSA commented Feb 13, 2019

Check your memory usage while it generates.
I can't recall specifics, but larger documents consumed gigabytes of memory, and the issue lies with wkhtmltopdf, not this library.

The issue seemed to be with large documents, not the content.
Generating 1000 pages one-by-one would be fast, but generating them at the same time would crush the system.

@rmjjjt
Copy link

rmjjjt commented Feb 27, 2019

I have been having this issue recently - tried so many different things with no luck. Then I came across this article about css rendering time. I had no border-radius in to remove, but I did have box-shadow on every page. I replaced the box shadow with a plain border and the pdf rendered almost instantly.
It may be worth checking your css for time consuming styles.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants