Soy nuevo en la representación de archivos en android, y quiero presentar o mostrar un archivo docx en mi aplicación.cómo mostrar o leer el archivo docx
Ya había extraído texto del archivo docx, pero ahora también quiero extraer imágenes del archivo docx.
He encontrado varias formas de mostrar imágenes en Java puro, pero ¿hay algún buen ejemplo para Android?
yo probamos este código en busca de imágenes, pero no funciona ...
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
}
}
}
}
¿Está buscando la comparación de archivos? Tengo el mismo problema! http://stackoverflow.com/questions/13411678/docx4j-giving-wrong-result –