[PLUG] render html to png image

Bill Barry barryb at proaxis.com
Thu May 28 21:12:19 UTC 2009


On Thu, May 28, 2009 at 1:59 PM, Tony Rick <tonyr42 at gmail.com> wrote:

> On Thu, May 28, 2009 at 12:15 PM, Bill Barry <barryb at proaxis.com> wrote:
>
> > Anything that can render a webpage  to a png must have behind it the
> whole
> > rendering engine and so is subject to what that rendering engine can
> > render.  There is  a program that uses webkit to convert html to pdf
> > http://code.google.com/p/wkhtmltopdf/
> > Then you can use several tools to go from pdf to png such as the
> pdfimages
> > utility in xpdf-utils.
>
>
> I tried this using
>
> > ./wkhtmltopdf  -O Landscape \
>
>     http://scratchcomputing.com/tmp/freetuit/063.html - \
> >
>     | convert - slide63_png.png
>
> (pipes pdf result to stdout, convert reads input from stdin)
>
> The result is attached.  This would take some tweaking to get a reasonable
> slide-like png result, if it's at all possible.
>
> - tony
>
>

The attachment didn't get through, but when I tried the above mentioned
command the png image looked exactly like the webpage as rendered by
Firefox.

Bill



More information about the PLUG mailing list