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

  • SEARCH
  • Home
  • 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 6671439
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T03:23:19+00:00 2026-05-26T03:23:19+00:00

When users upload certain files to my site (such as .doc, .xls, .pdf, etc)

  • 0

When users upload certain files to my site (such as .doc, .xls, .pdf, etc) I’d like to be able to generate a preview thumbnail (of the first page of the document). I’m working with PHP in a LAMP stack but would be happy with any library or command-line tool that can do the job (Linux highly preferred).

  • 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-05-26T03:23:19+00:00Added an answer on May 26, 2026 at 3:23 am

    It’s not easy to convert certain document formats to image. php alone cannot do this.
    The ‘proper’ way to do this is to first of all have the program installed on your server that can open the document in that format.
    For example, for .doc documents you can use OpenOffice
    it also can open most other document formats
    You then need to setup your open office to work in ‘headless’ mode, sending the output to virtual display (XVFB is what you going to need on Linux)

    You php script will then call OpenOffice, passing the path to uploaded doc. OpenOffice will actually open that doc. Then you need to create an image from the screen buffer. You can use ImageMagick for that

    Then once you have the capture of your screen you can resize it to a thumbnail.

    Look at this link for more details

    http://www.mysql-apache-php.com/website_screenshot.htm

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

Sidebar

Related Questions

I have File Upload form which users use to upload certain files on the
I am making a GWT application that involves users being able to upload files.
In certain situation users can send temporary files to my server. I would like
I would like display something more meaningful that animated gif while users upload file
I want to allow users to upload files with transaction information to my application.
I'm allowing authenticated users to upload image files with my PHP application. Assume I've
I need to allow users to upload PDF documents that other users will read.
My ASP.NET application allows users to upload and download large files. Both procedures involve
I'm trying to craete a site which allows users to upload any file type
I’m currently working on a website that will enable users to upload certain types

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.