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 8380209
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T16:23:51+00:00 2026-06-09T16:23:51+00:00

How can I detect images in a document say doc,xls,ppt or pdf ? I

  • 0

How can I detect images in a document say doc,xls,ppt or pdf ?

I came across with Apache Tika, I am trying its command line option.
http://tika.apache.org/1.2/gettingstarted.html

But not quite sure how it will detect images.

Any help is appreciated.

Thanks

  • 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-09T16:23:53+00:00Added an answer on June 9, 2026 at 4:23 pm

    You’ve said you want to use a command line solution, and not write any Java code, so it’s not going to be the prettiest way to do it… If you are happy to write a little bit of Java, and create a new program to call from Python, then you can do it much nicer!

    The first thing to do is to have the Tika App extract out any embedded resources within your file. Use the --extract option for this, and have the extraction occur in a special temp directory you app controls, eg

    $ java -jar tika.jar --extract ../testWORD_embedded_pdf.doc
    Extracting 'image1.emf' (application/x-emf)
    Extracting '_1402837031.pdf' (application/pdf)
    

    Grab the output of the extraction if you can, and parse that looking for images (but be aware that some images have an application/ prefix on their canconical mimetype!). You might need to run a second –detect step on a few, I’m not sure, test how the parsers get on with the extraction.

    Now, if there were images, they’ll be in your test dir. Process them as you want. Finally, zap the temp dir when you’re done with the file!

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

Sidebar

Related Questions

I'm trying to detect broken images in jQuery, in which case I want to
How i can detect spoiled images after upload? Im using some code like this:
How can I detect the difference between 2 images, creating a mask of the
Is there a way I can detect an image URL, like: http://mysite.com/image.jpg but with
I can detect that app is running under iOS Simulator (using sysctlbyname(hw.machine) ), but
I can detect my iPad device running an iPhone app in 1x or 2x
Is there anyway I can detect via jQuery if a select form element is
I know that richtextboxes can detect links (like http://www.yahoo.com ) but is there a
I want to build flash application that can detect the user eyes color and
Is there any way that you can detect the resizeHandlers moment of completion? something

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.