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
2 answers

Insert field codes into document using docx4java

Using Docx4J, how would I insert a fieldcode such as "INCLUDEPICTURE" into a document? I need to use the \d switch for INCLUDEPICTURE. UPDATE: This code isn't working when I insert an image from the internet. :-( boolean save = true; …
Monarch Wadia
  • 4,400
  • 4
  • 36
  • 37
0
votes
1 answer

xhtml->docx->xhtml retain div ids?

I'm attempting to export some CKEditor created xhtml fields from a database, convert them to a docx, edit the document in Word, then convert it back to xhtml and import those fields back into the database. I'm currently using docx4j-XHTMLImport,…
Morgan Dowell
  • 267
  • 5
  • 11
0
votes
1 answer

Required version of docx4j for jdk 1.4

What version of DOCX4j is suitable for JDK 1.4 based java compiler. I want to convert a docx file to html file using docx4j jar Regards Prasad
user3349850
  • 225
  • 1
  • 3
  • 21
0
votes
1 answer

How to get the font style of a paragraph

I am a newbie for docx4j and for my application I need to identify the sentences (or paragraph) is in bold. I cannot figure out how to get the font style details for a particular paragraph. Any help is appreciated
Nadeeshaan
  • 356
  • 5
  • 15
0
votes
1 answer

Using XLSX4J To Add Rows To a PPTX Chart

I have a template pptx file with a bar chart of several percentages. Each bar represents one percentage. My plan is to keep the chart in place but just remove the existing bars and add new ones using xlsx4j. Here's the relevant java code, which…
Alex03
  • 131
  • 1
  • 1
  • 9
0
votes
1 answer

PDFBox not printing text

I am attempting to print Word documents generated using docx4j that I convert to PDF and print using PDFBox. The document I'm attempting to print just contains a simple table with basic English text. This is the method I use: private void…
0
votes
1 answer

How to fetch all text from the DOCX as-is

I have a word document with sample text from new york times like below: Sample Text: KABUL, Afghanistan – Secretary of State John Kerry began a series of meetings in Kabul on Friday in hopes of finding a way out of a presidential election…
Anthony
  • 33,838
  • 42
  • 169
  • 278
0
votes
1 answer

Docx4J: Vertical text frame not exported to PDF

I'm using Docx4J to make an invoice model. In the left-side of the page, it's usual to show a legal sentence as: Registered company in ... Book ... Page ... I have inserted this in my template with a Word text frame. Well, my issue is: when…
yaki_nuka
  • 724
  • 4
  • 26
  • 44
0
votes
1 answer

Input Special characters to PPTX using docx4j

I got a special character from ASCII value and created a presentation by inputting that character using docx4j library. If I want to print "£" mark it print with "£". Is there a special way to input special characters to the PPT. I used following…
0
votes
1 answer

docx4j.NET installation issue

I've installed docx4j.NET 3.0.1 from Nuget with vs2012. When I try to use the library with this call WordprocessingMLPackage.load(inputS, ""); I receive this error: System.TypeInitializationException: The type initializer for…
0
votes
1 answer

How to correctly position a header image with docx4j?

I am trying to convert this Word document with a header showing an image on the right http://www.filesnack.com/files/cduiejc7 to PDF using this sample…
Matthias
  • 1,759
  • 16
  • 34
0
votes
1 answer

What does PathToFile means?

I have found the code below that's supposed to help me show and modify a docx file in my program, posted by user3610008 here: Setting the font and style of jeditorpane . I have change the PathToFile in the code by a direct link to a file exp…
Mustafa
  • 1
  • 2
0
votes
2 answers

Using docx4j in XPages applications

I'm trying to install the docx4j open source java library in an XPages application but so far without success. I have downloaded the docx4j-3.1.0.jar and added it to the \jvm\lib\ext folder on both the domino server and my local machine. I have also…
user1358852
0
votes
2 answers

pptx4j: Support for Sections / Slidelist

Is there any api for PPTx Sections / SlideLists? See http://msdn.microsoft.com/en-us/library/dd907440%28v=office.12%29.aspx If there isn't, any suggestions how to start with this? Thanks!
fiffy
  • 840
  • 9
  • 16
0
votes
1 answer

Docx4J - ImportXHTML - Sample code Not running properly

I am looking to use Docx4j, specifically to convert html pages to word documents, so I was playing around with it, but I am unable to get the sample code in the git repo to work. XHTML URL to word doc specifically is what is causing me issues. When…
Shrivar R
  • 123
  • 1
  • 12