当前位置: 动力学知识库 > 问答 > 编程问答 >

Maintaining phantomjs instance in python

问题描述:

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.

分享给朋友:
您可能感兴趣的文章:
随机阅读: