Questions tagged [docx4j]

Docx4j is an open source (ASLv2) Java library for manipulating Microsoft OpenXML files (Word docx, Powerpoint pptx, and Excel xlsx) via JAXB

Docx4j is a Java library for manipulating Microsoft OpenXML files (Word docx, Powerpoint pptx, and Excel xlsx). It uses JAXB to create the in-memory representation.

It is similar to Microsoft's OpenXML SDK, but for Java. docx4j uses JAXB to create the in-memory object representation.

It is available under the Apache License (v2).

docx4j was created by Plutext Pty Ltd in 2008 - using OpenXML4J for the OPC piece. Plutext still drives the project, but since then docx4j has benefited from contributions from many individuals. The contributors are listed in docx4j's pom.xml.

The docx4j online demo is available here.

911 questions
0
votes
1 answer

Converting docx to pdf ()

Few days ago I have faced with legacy code which processed .docx file as template and put values into placeholders. This system properly work until complex tables were inserted into template. I cant found solution except remake table. Maybe someone…
Ivan
  • 13
  • 5
0
votes
1 answer

Is it possible to use XPath 2 or 3 with docx4j

I am using docx4j databinding to populate docx templates with some XPath 1.0 functions. Is it possible to use XPath 2 or 3 functions with docx4j?
Mike
  • 63
  • 5
0
votes
1 answer

Integrate Video file (.mp4) in docx/doc

I want to integrate video files in docx or doc document means I need to play video inside docx file. So Can you please provide me lists of Open source or Enterprise java API for this video integration in docx file. Thanks In Advance... :)
sus007
  • 297
  • 3
  • 9
0
votes
0 answers

Not able to convert the html tags into style in Word document

I need a help to convert the html tags like ul, ol to corresponding plain text with their style preserved in java. Am able to remove the tags but failed in preserving styles. e.g.:
  • Coffee
  • Tea
  • milk
Dina
  • 11
  • 2
0
votes
1 answer

Docx4j logging with log4j in ERROR mode

I'm using docx4j to create some docx files from a template. But it keeps generating some annoying loggings when generating it. This is my log4j.properties file log4j.rootLogger=ERROR, consoleAppender,…
mateusbrigido
  • 37
  • 1
  • 8
0
votes
1 answer

Xpath Part NULL, with xpaths set via content control toolkit

I've been able to set, via code, the xpaths for the placeholders found in the document. for (Object o : finderSdtRun.results) { if (o instanceof SdtRun){ SdtPr sdtPr=((SdtRun) o).getSdtPr(); Tag t =…
0
votes
1 answer

Add paragraph from a document to another document

After I solved my problem on docx4j previously, I'm be able to use it now. I just try to run the sample code from this link http://www.smartjava.org/content/create-complex-word-docx-documents-programatically-docx4j with some modification. let's say…
Doppellon
  • 1
  • 2
0
votes
1 answer

jaxp_feature_not_supported exception on docx4j

I am trying to use docx4j on my project. (I'm quite a newbies on it.) I just try to run the sample code from this link. http://www.smartjava.org/content/create-complex-word-docx-documents-programatically-docx4j The input is .docx file and the output…
Doppellon
  • 1
  • 2
0
votes
1 answer

Docx4j Issues converting to pdf

I know there's a lot of issues in this console report, but since I'm not that expert in docx4j and all the related packages, I' d like to have some explanations, especially on the reason why it is having formatting issues. Please give me some…
0
votes
0 answers

Exporting PDF Docx4j error

I'm getting this kind of error, which I don't know how to treat. I guess Xalan, Serializer are responsible but I must have them inside my Jboss module to let everything work fine. Please give me some hint. 12:26:48,832 SEVERE…
0
votes
0 answers

Jar issues with JAXB Implementation

Im trying to manipulate document using docx4j library and as a standalone , the program worked fine but when i deployed it in jBoss, it is giving below error I have checked and found that jaxb-impl.jar already exists in jboss classpath 10:44:28,118…
JavaGeek
  • 1,535
  • 9
  • 39
  • 63
0
votes
1 answer

Docx4j on Jboss 6.3

I get this error: Caused by: java.lang.LinkageError: Failed to link org/docx4j/jaxb/NamespacePrefixMapperSunInternal (Module "deployment.NetiEar.ear.NetiWeb.war:main" from Service Module Loader) at…
0
votes
2 answers

Get the title or alias of a content control in docx4j

I would like to know if it is possible to get the title of a content control. It is very easy to get the Tag but the title called alias in the XML is unreachable. When I ask the class I get the mean "javax.xml.bind.JAXBElement" Here is what I want…
Igor Beaufils
  • 848
  • 2
  • 12
  • 29
0
votes
0 answers

Convert MS Office Document to XML

I am working on this project that requires extracting data from all sorts of document, and for this I need to convert the document to XML so that I can later parse it using SAX Parser. So, how do I get the XML equivalent of a ms office document?
Nidhi jain
  • 123
  • 3
  • 14
0
votes
1 answer

Inserting an image into specific points in a Word document with Docx4j and OpenDOPE using Java

I have 2 files - one a template document in the form of a standard MS-Word docx format file, which is marked up with Content Control placeholders using the OpenDoPE add-in for MS-Word developed by Plutext. The second file is an XML file containing…