Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

How specifically did you use PhantomJS for PDF generation?


There's an example here: http://code.google.com/p/phantomjs/wiki/QuickStart#Rendering (gives examples of .png and .pdf generation)


Thank you for posting. I recently did a bit of research on producing thumbnails with Ruby using this project: 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?


Not any more, as a web search immediately reveals: http://code.google.com/p/phantomjs/issues/detail?id=418


PhantomJS 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.


PhantomJS doesn't run on node.js




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: