I have some HTML reports generated by Classic ASP and I need them converted to PDF. Searching for a solution I found out phantomJS, which has 'rasterize.js', a functionality that would take the HTML and output it as PDF.
The problem is that I can´t figure out how to call phantomJS from my original/current webpage.
The idea I had in mind is, my current webpage calls phatomjs sending its HTML content then phantomjs would call rasterize.js and output the PDF to the server, then I would get the name of the recently created PDF and serve it back to the client.
Is there a way this could be done?
答案 0 :(得分:1)
Phantomjs is not the made for running in the browser as far as I know.
You have different options for this:
答案 1 :(得分:0)
你可以通过shell来调用服务器上的phantomjs。 在大多数语言中看起来像:
`phantomjs myscript.js`