Reputation: 237
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?
Upvotes: 0
Views: 1052
Reputation: 54984
You can call phantomjs from the server by shelling out to it. In most languages that will look like:
`phantomjs myscript.js`
Upvotes: 0
Reputation: 15756
Phantomjs is not the made for running in the browser as far as I know.
You have different options for this:
Upvotes: 1