sitimoen / xdocreport

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

Font change when sent with the html content. #290

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I did a report with html content.

The parameter input variable of the template which  i set font to TH Sarabun 
New.

But when docx generate the content will change to Calibre for English content 
and Angsana New for Thai content.

Is the xdocreport generate font default for html content or Office generate 
them from itself?.

Example 
Input : "1120ทดลอง<br/>1122ทดสอบ"
Ouput:  
1120ทดลอง
1122ทดสอบ

Note 
- 1120 and 1122 will be generated with Calibre font 
- ทดลอง and ทดสอบ will be generated with Angsana New font

Original issue reported on code.google.com by administ...@iessystem.com on 30 Aug 2013 at 1:06

Attachments:

GoogleCodeExporter commented 8 years ago
Fix:

Addition

1120ทดลอง front of the beginning of HTML tag is fine with TH Sarabun 
New font and the after content of HTML tag will be changed to the such thing.

Original comment by administ...@iessystem.com on 30 Aug 2013 at 1:09

GoogleCodeExporter commented 8 years ago
Hi,

If you wish to use special font in your html, you must escape it. See JUnit at 
https://code.google.com/p/xdocreport/source/browse/document/fr.opensagres.xdocre
port.document.docx/src/test/java/fr/opensagres/xdocreport/document/docx/textstyl
ing/DocxDocumentHandlerTestCase.java

Regards Angelo

Original comment by angelo.z...@gmail.com on 30 Aug 2013 at 1:13

GoogleCodeExporter commented 8 years ago

Original comment by angelo.z...@gmail.com on 30 Aug 2013 at 1:13

GoogleCodeExporter commented 8 years ago
> 1120ทดลอง front of the beginning of HTML tag is fine with TH 
Sarabun New font and the > after content of HTML tag will be changed to the 
such thing.
when br is done, XDocReport generate a new paragraph but without using the 
style of the paragraph which contains the HTML field. 

I think it should be better to copy style of the paragraph which hosts the html 
field, but I'm afraid that's it's a little complex to do that.

Original comment by angelo.z...@gmail.com on 30 Aug 2013 at 1:15

GoogleCodeExporter commented 8 years ago
if i want to loop in docx without new line border , can i?

I try when it loop , it will generate new border line so i have to do br 
instead.

Original comment by administ...@iessystem.com on 30 Aug 2013 at 4:21

GoogleCodeExporter commented 8 years ago
Please attach a java main which generates your report.

But I don't know when I will see your problem.

Regards Angelo

Original comment by angelo.z...@gmail.com on 30 Aug 2013 at 7:47