Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Seeking Advice on Optimizing PDF Generation Speed in wkhtmltopdf

25 views
Skip to first unread message

Vishnu Shanmughan

unread,
Apr 8, 2024, 5:25:43 AM4/8/24
to wkhtmltopdf General
I'm converting moderately complex HTML/CSS files to PDF and  files I'm converting vary in size, but some are larger than others. It takes normally 3 to 5 minutes to complete. Is there any way to optimize the speed of PDF generation.

Umesh D

unread,
Mar 21, 2025, 12:30:27 AMMar 21
to wkhtmltopdf General
If your Html contains images more it will take time and you can try setting up the
-d, --dpi <dpi> Change the dpi explicitly (this has no effect on X11 based systems) (default 96) --image-dpi <integer> When embedding images scale them down to this dpi (default 600) --image-quality <integer> When jpeg compressing images use this quality (default 94)

https://wkhtmltopdf.org/usage/wkhtmltopdf.txt
I have generated 1000 pages that will have only 1 image. It generated lessthan minute.

Reply all
Reply to author
Forward
0 new messages