Steve Litt on 22 Nov 2015 09:13:19 -0800

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Need to Convert HTML Page to jpg Image

On Sun, 22 Nov 2015 11:58:33 -0500
Casey Bralla <> wrote:

> I'm writing a web application where users will upload an HTML page
> which will be shown on another page.   I want to allow the user to
> see a miniature image of the HTML file they uploaded.
> Anybody know how to convert an HTML page into a jpg or png file?
> I've seen online tools to do this, but I need to have my application
> automatically convert them on the fly (ie: I need a cli program to
> convert HTML into a png or jpg.)

I think you need to define your requirements more tightly. Do you want
the .png to include every single word of a 500K word web page? A sort
of 8.5" x 3000" .png? Or do you want the .png to be what the viewer sees
in the browser after the HTML file has been loaded but before any
scrolling or navigation has taken place? Do you need just the raw text,
or do you need the appearance and fonts too? Do you want the containing
browser to be part of the image (a screenshot, in other words)?


Steve Litt 
November 2015 featured book: Troubleshooting Techniques
     of the Successful Technologist
Philadelphia Linux Users Group         --
Announcements -
General Discussion  --