Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7788235
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T20:55:55+00:00 2026-06-01T20:55:55+00:00

In my web app, the user can create some HTML/CSS markup that is saved

  • 0

In my web app, the user can create some HTML/CSS markup that is saved in my database. I would like to offer a ‘thumbnail’ for that markup, for example in the overview view.

Since the thumbnail should be at around 200x200px, and the original markup is intended to be viewed at around 900x900px, I have to find a way to ‘scale’ that markup: It should be as if I took a screenshot of the rendered markup at 900px and scaled it down to 200px.

Does anybody know if this is possible using JavaScript or PHP? Or perhaps another server-side language? I would like to avoid using any 3rd party applets sucht as ActiveX.

Edit: I guess some kind of mashup, where the screenshot is taken on the client side, and then sent to the server would also be OK.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T20:55:57+00:00Added an answer on June 1, 2026 at 8:55 pm

    You can use WKHTMLTOPDF. It also has the functionality to save images called WKHTMLTOIMAGE (I think that’s a different distribution, but you can download it from the same link). You can run it with exec() from PHP as a system call. Using a virtual buffer like xvfb you can run the WKHTMLTOIMAGE headless on the server. It is WebKit based so the results produced are really good…

    You can scale the resulting image with standard PHP functions like described for example in these posts:

    • dynamically scale images in php jpg/png/gif
    • Resize image using PHP if it's too small

    You might want to check my answer to this question HTML2PDF in PHP – convert utilities & scripts – examples & demos, maybe it helps you too.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I have a simple web app where I can create a user (UserModel)
I'm developing web app that user can save his/her work to server. The data
I work on a web app that involves scheduling. A user can view his
I'm developing a web-app where the user can create multiple related elements and then
I am working on a web app that allows user to edit specific HTML
In C# I can get the current user of a web app using the
This is a web app that works when user searches for an item to
I have a web app that will draw a polyline for each user (tracks
I've a JSP/Servlet Web App that consist of more than one servlet (and some
I have a web app that uses some backend servers (UNC, HTTP and SQL).

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.