问题描述:

I generate PDFs using a modified version of 'rasterize.js' in Phantomjs. It follows the method involving pipes explained here by Pooria Azimi. Everytime a PDF is generated I have to launch a process to run phantomjs. But phantomjs takes significant amount of time and space to run.

Is there a way to maintain an active phantomjs instance instead of initiating it everytime?

This page shows how it is done in nodejs, refer 'Avoiding PhantomJS init for every PDF generation'. I am not sure how to achieve the same in python. I use Python 3.

相关阅读:
Top