bernhard Posted November 11, 2015 Share Posted November 11, 2015 Does anyone of you know a good way to create pngs from html? I want to render the content of a ckeditor field as png for something like a photobook creator. The problem with creating PDF is that my library adjusts the font size to the content so I get inconsistency between preview and printed PDF. The goal is that I can edit the content via something like FEEL, update the preview via ajax and have exactly the same result in the PDF! Thank you for your suggestions. Link to comment Share on other sites More sharing options...
tpr Posted November 11, 2015 Share Posted November 11, 2015 I don't think you can achieve this (maybe 5yrs later ). My first (and only) idea is to use html5 canvas but I'm not sure that would work. Here is something similar: http://cburgmer.github.io/rasterizeHTML.js/ 1 Link to comment Share on other sites More sharing options...
LostKobrakai Posted November 11, 2015 Share Posted November 11, 2015 I think the best bet would be something like phantom.js. 3 Link to comment Share on other sites More sharing options...
Pete Posted November 11, 2015 Share Posted November 11, 2015 This may get you a bit closer with Phantom.js if you know the coords of your CKEditor field: https://github.com/microweber/screen 2 Link to comment Share on other sites More sharing options...
bernhard Posted November 12, 2015 Author Share Posted November 12, 2015 thanks guys, i'll have a look at phantom.js! maybe i'll also adapt my already in use pdf approach Link to comment Share on other sites More sharing options...
Recommended Posts