Page 1 of 1

Java sample code for invoice2013.docx

PostPosted: Thu Mar 19, 2015 9:00 pm
by HarryVienna
Hello,

I'm completly new to docx4j and just try to learn the concepts...

I downloaded the complete source from github und found the files invoice2013.docx and invoice2013.xml in the samples folder. Unfortunatly there is no java source that uses this files. Can please somebody give me a working java file that works with these 2 files?

Thank you very much!!

Cheers from Vienna
Harald

Re: Java sample code for invoice2013.docx

PostPosted: Thu Mar 19, 2015 10:25 pm
by jason

Re: Java sample code for invoice2013.docx

PostPosted: Thu Mar 19, 2015 10:54 pm
by HarryVienna
Thanks for your reply!

I tried it and it works somehow, but I think in the output file there should be two lines in the item list and two lines in the notes at the end (according to the content of invoice2013.xml)? But there is only one line...

Or do I misunderstand something?

Thanks
Harald

Re: Java sample code for invoice2013.docx

PostPosted: Fri Mar 20, 2015 5:40 pm
by jason
Sorry, you need the latest code for it to work properly:-

https://github.com/plutext/docx4j/commi ... 0aa5aa9d0e

The files you mention invoice2013.docx and invoice2013.xml are specific to the data binding enhancements introduced in Word 2013 (and the above patch); see further http://www.docx4java.org/blog/2015/01/w ... rime-time/

The follow up post may also be of interest:

http://www.docx4java.org/blog/2015/01/i ... -now-what/

(Use the other invoice sample files with any recent release of docx4j)