in reply to Howto Save/Convert HTML into JPEG/PNG with Perl

So 1 more who'd like to enter the multi-million dollar business of thumbnail generation! ;-)

In fact I found 3 solutions.

1. You can use html2ps -> then convert the .ps with imagemagick to a .png (works, but all thumbs have a white background - as html2ps is intended for printing)

2. The medium-weight approach of using a browser's render engine and get the output (I used the kwebdesktop library on linux and got mediocre results so far, render errors and no flash, and I think it wastes a LOT of memory! and I can't control the user-agent string easily)

3. The heavy-weight approach of using an external browser and take a capture of the browser's window. Which I didn't try so far as I dislike the idea of the overall design.


Remark 1: To my knowledge there is no all-in-one html-render-and-output-as-image module on cpan.

Remark 2: Which module on Corion?
  • Comment on Re: Howto Save/Convert HTML into JPEG/PNG with Perl

Replies are listed 'Best First'.
Re^2: Howto Save/Convert HTML into JPEG/PNG with Perl
by Anonymous Monk on Aug 23, 2016 at 06:36 UTC
    It would be helpful if some would let me know...how i can convert a htmlcontent into png....ASAP