Closed witchard closed 7 years ago
@witchard I will take a look on PNG case
@witchard unfortunately, for writing PNG or PDF I use internal Phantom renderer:
page.render(pngFileName);
Phantom looks at pngFileName
extension and decides what data to render and save on disk.
I would do PNG too, but my javascript and knowledge of phantomjs isn't good enough. There seems to be a renderBase64() function, but when passing that through atob() and then to system.stdout.write() that doesn't generate a correct PNG. It looks to be some form of weird encoding issue as just writing the result of renderBase64() and then decoding it on the command line (base64 -D on my mac) does produce a valid png.