problem with JasperReports docx output
Posted: Fri Mar 18, 2011 6:28 pm
Hello everyone,
I have a task to add header and footer to our docx files that are created using other free source solution based on Java,
called Jasper Reports.
This solution does not allow adding header/footer so I thought of using docx4j.
Now the problem is that the files exported by Jasper are somehow incomplete or corrupted.
I attached 2 files for example.
The code that I'm trying to use is HeaderFooterCreate. This is working fine for docx files created by MS Word or docx4j samples, but not for my files .
On the other hand, MS Word opens them without any problems and if I hit Save As "filename2.docx" then docx4j can open them.
My question is, can I somehow fix these files so that I can edit them using docx4j to add header/footer?
By fixing I mean editing them with java code, not manually with MS Word.
Thank you,
Cristi
I have a task to add header and footer to our docx files that are created using other free source solution based on Java,
called Jasper Reports.
This solution does not allow adding header/footer so I thought of using docx4j.
Now the problem is that the files exported by Jasper are somehow incomplete or corrupted.
I attached 2 files for example.
The code that I'm trying to use is HeaderFooterCreate. This is working fine for docx files created by MS Word or docx4j samples, but not for my files .
On the other hand, MS Word opens them without any problems and if I hit Save As "filename2.docx" then docx4j can open them.
My question is, can I somehow fix these files so that I can edit them using docx4j to add header/footer?
By fixing I mean editing them with java code, not manually with MS Word.
Thank you,
Cristi