3 ms·
I used this for a project the other day, but after discovering PhantomJS I feel like it has more traction.
by beggi 14y ago
I used this for a project the other day, but after discovering PhantomJS I feel like it has more traction.
- snowmaker 14y agoHow specifically did you use PhantomJS for PDF generation?
- imurray 14y agoThere's an example here: http://code.google.com/p/phantomjs/wiki/QuickStart#Rendering http://code.google.com/p/phantomjs/wiki/QuickStart#Rendering (gives examples of .png and .pdf generation)
- ashconnor 14y agoThank you for posting. I recently did a bit of research on producing thumbnails with Ruby using this project: https://github.com/csquared/IMGKit https://github.com/csquared/IMGKit. Only problem was getting the screenshot to work with Flash. It seems as thought the javascript delay option on wkhtmltopdf didn't delay at all. Can PhantomJS handle pages with Flash?
- imurray 14y agoNot any more, as a web search immediately reveals: http://code.google.com/p/phantomjs/issues/detail?id=418 http://code.google.com/p/phantomjs/issues/detail?id=418
- qznc 14y agoPhantomJS has a "render(fileName)" API which supports PDF. Essentially, it is trivial to implement something like Wkhtmltopdf. However, Wkhtmltopdf is a shrinkwrap solution, which does not require you to install nodejs.
- chrisbroadfoot 14y agoPhantomJS doesn't run on node.js