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

The Archive Base Latest Questions

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

I am trying to use Apache POI to extract embedded equation and text from

  • 0

I am trying to use “Apache POI” to extract embedded equation and text from a .doc MS Word file into a .ppt MS Powerpoint file, I have successfully extracted text, but how do I extract embedded equations?

the Embedded Equations comes out like this if I only extract it as text:

!!EMBED Equation.3
  • 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-09T13:48:53+00:00Added an answer on June 9, 2026 at 1:48 pm

    This may not help you with the binary .doc format, but for the newer .docx format, I was able to get to the equation, which is embedded as an OLE document, using the following code:

     InputStream in = new FileInputStream(f);
     XWPFDocument doc = new XWPFDocument(in);
     for (PackagePart p : doc.getAllEmbedds()) {
       POIFSFileSystem poifs = new POIFSFileSystem(p.getInputStream());
       byte[] oleData = IOUtils.toByteArray(
                  poifs.createDocumentInputStream("Equation Native"));
     }
    

    And then you can extract the MathType data in there and hand it to a MTEF parser.

    If you don’t need the MathType data, there is also a placeholder image (in WMF format) that just renders the equation.

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

Sidebar

Related Questions

I was trying to use Apache POI (Version 3.6) to parse Excel .xls file,
I am trying to use GLSMultipleLinearRegression (from apache commons-math package) for multiple linear regression.
I am trying to use MultiValueMap (implementation of MultiMap ) from apache collections. I
I am trying to download an image from URL. I use the Apache Commons
I'm trying to use Apache Commons Net for FTP file transfers. Problem is files
I'm trying to use Hyperjaxb3 with Apache CXF to generate persistence annotations from a
I am trying to use apache shiro into my project as I have to
Trying to use Apache POI in a Eclipse JSP project. The POI jar is
I'm trying to use embedded ActiveMQ broker for unit testing, as explained here: http://activemq.apache.org/how-to-unit-test-jms-code.html
I'm trying to use the StringEscapeUtils.escapeXML() function from org.apache.commons.lang... There are two versions of

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.