Page 1 of 1

docx4j-3.2.0.jar

PostPosted: Fri Oct 03, 2014 5:37 pm
by ananeila
Hello, I am Ana, a java developer, and have been working as a java programmer for many years. But now I need some help.
I am using docx4j-3.2.0.jar and trying to generate a word document.
I don´t know how to insert a header and footer in my document, either insert and image in the header.
Is possible to align text in the header (and footer) on the right?.
Any help would be very useful.
greatings.
Ana

Re: docx4j-3.2.0.jar

PostPosted: Sat Oct 04, 2014 12:25 pm
by jason
ananeila wrote:I don´t know how to insert a header and footer in my document,


See https://github.com/plutext/docx4j/blob/ ... reate.java

ananeila wrote:either insert and image in the header.


See https://github.com/plutext/docx4j/blob/ ... geAdd.java

BinaryPartAbstractImage contains a method which lets you specify the part you want to add the image to (eg your header part, created above).

ananeila wrote:Is possible to align text in the header (and footer) on the right?.


Yes. To see how to do this, create a sample docx in Word, then unzip it and look at the XML.

You can upload that docx to our webapp at http://webapp.docx4java.org/ and have it generate code for you.

Please read the Getting Started document :-)

Also, for any future questions, 1 question/topic per post please, and use a suitable subject line.

Re: docx4j-3.2.0.jar

PostPosted: Mon Oct 06, 2014 5:19 pm
by ananeila
Hello again
Many thanks for your help. I will try everything.
Next time I need help I´ll make a question for each entry.
Tanks again and greetings
Ana