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

Docx4j DrawingML and VML (docx to PDF)

I am a bit new to Docx4j and "wordML". I want to convert this docx to a pdf : But my research showed me that drawingML and VML wasn't supported, at least yet. like :…
Igor Beaufils
  • 848
  • 2
  • 12
  • 29
0
votes
2 answers

Turn off Console Messages docx4j

Docx4j gives me a bunch of messages like this [AWT-EventQueue-0] INFO org.docx4j.model.listnumbering.Emulator - How to turn that off? The following log configuration gets loaded, but doesnt turns the logging off.
user2147674
  • 2,319
  • 2
  • 14
  • 17
0
votes
1 answer

How to add custom XML storage part to Word doc - preferrably with docx4j

I'm trying to populate a Word content control with XML data using docx4j (version 3.2.1). I'm evaluating this in order to use it for invoice generation. The documents we want to generate are not very complicated so this looks like a good approach to…
EagleBeak
  • 6,939
  • 8
  • 31
  • 47
0
votes
1 answer

Need help finding a solution to achieve word reporting under Android (actually using docx4j)

I'm an engineering student (end of 3rd year) doing an internship where I have to simplify a procedure for creating word reports (.docx). I decided to develop an Android application so the work can be done from the phones and tablets. I have achieved…
Stone Edge
  • 52
  • 11
0
votes
1 answer

How to Print Using Docx4j

I'm using Docx4j to create an MS Word document (.docx). Once this document is created, is there any way to print it? I didn't see anything in Docx4j's documentation and am assuming I have to convert the docx to pdf and print it from there. Is there…
corpico
  • 617
  • 3
  • 16
  • 26
0
votes
1 answer

Docx4j: footer/header is not applied to every page in document

I'm trying to export a word document which is about 2-3 pages. I use 2 images, one for header and another one for footer. The problem is the header and footer images only appear on front page but not on the other 2 pages. Currently I'm using docx4j…
Trung Bún
  • 1,117
  • 5
  • 22
  • 47
0
votes
1 answer

HTML to Docx using Docx4j

I have been trying to convert html content to docx using their library and I do get a docx file created after running my app but it has blank content whereas the html does have some content in it. Please check the code below and I have included all…
Abhishek Singh
  • 415
  • 1
  • 12
  • 24
0
votes
2 answers

docx4j open odt files

Im trying to convert word files to pdf using docx4j, so far i have successfully converted doc and docx files, but when i try to load an odt file i get InvalidFormatException: Bad [Content_Types].xml and by opening the odt file with zip, i can see…
Ouerghi Yassine
  • 1,835
  • 7
  • 43
  • 72
0
votes
2 answers

Dalvik error using Doc to HTML android docx4j

I am just using the code at https://github.com/plutext/AndroidDocxToHtml for converting doc to html but I am getting Conversion to Dalvik format failed with error 1. What is the issue?
Abhishek Singh
  • 77
  • 2
  • 11
0
votes
1 answer

Unable to Add Image to Document Using DocX4J

I'm trying to add Image to Document (.docx) using Docx4j library with code like below. The image already exists in local machine and initially i taught it doesn't support png and then i have renamed the image to jpg and it still throws error String…
JavaGeek
  • 1,535
  • 9
  • 39
  • 63
0
votes
1 answer

export HTML to DOCX with Docx4j

I need to generate a DOCX from Webpage (with Images). Will it be possible for DOCX4J to export the HTML Content to DOCX Format ? Are there any other libraries which can export HTML Content to DOCX?
Pradheep T
  • 11
  • 1
  • 2
0
votes
1 answer

Printing contents of xlsx sheet

I'm using docx4j in eclipse to get the contents of an excel sheet but all what I'm getting is numbers. For simplicity, assume this is my sheet: | asd | sd | | hgn | The code I'm using to load the contents is: public static void load(String…
kamal
  • 96
  • 1
  • 2
  • 10
0
votes
1 answer

Unable to load an xlxs spreadsheet into eclipse

I want to implement a java desktop-application using eclipse that takes the information from the user and saves it into excel spreadsheet (using docx4j), but I faced a problem at the very beginning. I'm trying to load the spreadsheet using this…
kamal
  • 96
  • 1
  • 2
  • 10
0
votes
1 answer

Copy contents from docx with bullets intact with Apache POI

I am trying to copy contents from a docx file to the clipboard eventually. The code I have come up with so far is: package config; public class buffer { public static void main(String[] args) throws IOException, XmlException { …
0
votes
1 answer

Jtidy - How to preserve space between inline elements

My Html source like this

Hello World

The output got like this after conversion(without space):- HelloWorld
Fire Ratz
  • 3
  • 1