How to render HTML as an image in PHP?

Posted on 2009-02-18
Last Modified: 2012-05-06
I need to make a thumbnail images of HTML documents as they would display in a browser on-the-fly with PHP.  For example, index.php would read the contents of mywebsite.html, render the HTML code and create an exact image of how it would look in Mozilla.  Then I need to shrink that image to thumbnail size.

Is there any existing options for such a thing?  If not, what would be the best direction to start in towards developing it on my own?
Question by:tomdfx
    1 Comment
    LVL 14

    Accepted Solution

    try cutycapt :

    it can render an html page as jpeg, png, pdf, svg using the command line, for example :

    cutycapt --url= --out=google.jpg

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Both Easy and Powerful How easy is PHP? (  Very easy.  It has been described as "a programming language even my grandmother can use." How powerful is PHP?  http://en.wikiped…
    Deprecated and Headed for the Dustbin By now, you have probably heard that some PHP features, while convenient, can also cause PHP security problems.  This article discusses one of those, called register_globals.  It is a thing you do not want.  …
    The viewer will learn how to count occurrences of each item in an array.
    The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    7 Experts available now in Live!

    Get 1:1 Help Now