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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T13:39:47+00:00 2026-06-05T13:39:47+00:00

I am new to rendering files in android, and I want to render or

  • 0

I am new to rendering files in android, and I want to render or display a docx file in my application.

I had already extract text from docx file, but now I want to extract images from the docx file as well.

I’ve found several ways to display images in pure Java, but are there any good examples for Android?

I tried this code to fetch Images but not working…

public void extractImages(Document xmlDoc)
{
    NodeList binDataList = xmlDoc.getElementsByTagName("w:drawings");
    String fileName = "";
    Node currentNode;
    for(int i = 0; i < binDataList.getLength(); i++)
    {
        currentNode = binDataList.item(i);
        if(currentNode.getNodeType() == Node.ELEMENT_NODE && ((Element)currentNode).hasAttribute("w:name"))
        {               
            File newImageFile = new File(picDirectory, ((Element)currentNode).getAttribute("w:name").replaceFirst("wordml://", ""));
            if(newImageFile.exists())
            {

            }
            else
            {
                if(writeImage(newImageFile, currentNode))
                {
                    //Print some success message
                }
            }
        }
    }
  • 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-05T13:39:48+00:00Added an answer on June 5, 2026 at 1:39 pm

    Have a look at AndroidDocxToHtml, which I made to demonstrate using docx4j on Android.

    A couple of caveats.

    First, that project does not include all docx4j dependencies, only the ones required for docx to HTML conversion. So if you want to do other things, you may need others of the dependencies.

    Second, docx4j requires JAXB – see this blog post re JAXB on Android – and JAXB context init on app startup takes a while depending on the device. There are ways to work around this, but at extra effort.

    If all you want to do is extract the images, and you don’t care how they relate to the text, you could just look for image parts. You might use OpenXML4J for that, and avoid JAXB.

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

Sidebar

Related Questions

I am trying to silent print PDF files from within a java application (more
I'm somewhat new to OpenGL. I've used it for extremely simple stuff like rendering
Google Chrome 17 introduced a new feature which preloads a webpage to improve rendering
Using the zipfile module I have created a script to extract my archived files,
I'm using StringTemplate to generate some xml files from datasets. Sometimes I have more
So I followed this tutorial from Google: http://developer.android.com/resources/tutorials/opengl/opengl-es20.html The triangle is supposed to rotate
I'm teaching myself OpenGL and I'm implementing ttf text rendering using FreeType 2. I
I've downloaded an HttpHandler class that concatenates JS files into one file and it
I am listing files from a directory and for each one there is a
I need to display a Treeview in my MVC3 application. There will be a

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.