StimVinsh / xdocreport

Automatically exported from code.google.com/p/xdocreport
0 stars 0 forks source link

textstyle output not readable by Word2010 #53

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Run Test.java with Template.docx in c:\transfer

What is the expected output? What do you see instead?
The out.docx should have replaced comments_html and should be readable by Word. 
But this is not the case. Word is refusing to read out.docx

What version of the product are you using? On what operating system?
0.9.3 Windows XP SP 2

Please provide any additional information below.
The Test.java is basically the html styling example from the wiki.
If I modify Test.java to not insert styled text (text without markup), 
everything is fine.
If I use TextStyling.docx from the examples instead of my Template.docx and 
modify it to Freemarker syntax for comments_html also everything is fine.
I expect some weird thing inside Template.docx that causes xdocreport to 
generate unreadable out.docx

Original issue reported on code.google.com by lars.poe...@googlemail.com on 8 Nov 2011 at 4:57

Attachments:

GoogleCodeExporter commented 8 years ago
Hi,

Text styling is very basic for the moment and I think it is very bugged like 
your bug. Your problem comes from that your mergefield is not inserted in a new 
paragraph (table cell). Text styling generates every time a paragraph. That's 
the problem.

I will try to fix that as soon as possible.

Regards Angelo

Original comment by angelo.z...@gmail.com on 8 Nov 2011 at 5:17

GoogleCodeExporter commented 8 years ago
Text styling will be improved on XDocReport 0.9.6. For the moment ODT was a lot 
improved.

Original comment by angelo.z...@gmail.com on 6 Feb 2012 at 1:21

GoogleCodeExporter commented 8 years ago
Hi,

Your case is that you are using <p> paragraph. To resolve your problem, you 
must not use <p> paragraph in your model : 

----------------------------
<i>Text</i> coming from Java context
----------------------------

But I agree with you, it's a bug, I think if we write 

----------------------------
<p><i>Text</i> coming from Java context</p>
----------------------------

It should generate a paragraph without breaking the docx.

Original comment by angelo.z...@gmail.com on 7 Feb 2012 at 10:58

GoogleCodeExporter commented 8 years ago

Original comment by angelo.z...@gmail.com on 20 Mar 2012 at 1:24