Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » Export to DOC Microsoft Word Issue
Export to DOC Microsoft Word Issue [message #881456] Mon, 04 June 2012 11:36 Go to next message
Dejan Vujanic is currently offline Dejan Vujanic
Messages: 66
Registered: October 2011
Member
Hi,

I previously had a problem with Cyrillic letters (they have not been pretty displayed ) to be shown in PDF when I export it from system.
So I changed fontsConfig.xml and fontsConfig_pdf.xml

I changed mapping:
<mapping name="serif" font-family="Arial Unicode MS" /> to Arial Unicode MS
and also encoding (this is for Cyrillic letters)
<encoding font-family="Arial Unicode MS" encoding="Cp1251" />

and also some composite font
<font font-family="Arial Unicode MS" catalog="Western" />

I changed this in this both files and now pdf is displayed correctly.

But now I have problem to export it to doc Microsoft Word:
when i export it in word non English letters are shown as little squares.
Font selected in word is Lucida Sans Typewriter.If I manually select text and then change font to Arial Unicode MS text is displayed OK.
So which file do I have to change for correct Word document?

Is it only fontsConfig_linux.xml???

I tried to put Arial Unicode Ms instead on Lucida Sans Typewriter on evry place (bolded one) but then I am getting format error corrupted document, and file is not opened!!!

<?xml version="1.0" encoding="UTF-8"?>
<font>
<font-aliases>
<mapping name="serif" font-family="Arial Unicode MS" />
<mapping name="sans serif" font-family="Lucida Sans" />
<mapping name="monospace" font-family="Arial Unicode MS" />
<mapping name="cursive" font-family="Arial Unicode MS" />
<mapping name="fantasy" font-family="Arial Unicode MS" />
</font-aliases>
<composite-font name="all-fonts" default="Arial Unicode MS">
<font font-family="Arial Unicode MS" catalog="Western" />
<font font-family="ZYSong18030" catalog="Chinese" />
<font font-family="Baekmuk Batang" catalog="Korean" />
<font font-family="Kochi Mincho" catalog="Japanese" />

</composite-font>
</font>


What do I have to change for correct word document?
Thanks

[Updated on: Mon, 04 June 2012 16:00]

Report message to a moderator

Re: Export to DOC Microsoft Word Issue [message #881966 is a reply to message #881456] Tue, 05 June 2012 10:52 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

What version of BIRT are you using?

Jason

On 6/4/2012 11:36 AM, Missing name Mising name wrote:
> Hi,
>
> I previously had a problem with Cyrillic letters (they have been non
> pretty dispalyed ) to be shown in PDF when I export it from system.
> So I changed fontsConfig.xml and fontsConfig_pdf.xml
>
> I changed mapping:
> <mapping name="serif" font-family="Arial Unicode MS" /> to Arial Unicode MS
> and also encoding (this is for Cyrillic letters)
> <encoding font-family="Arial Unicode MS" encoding="Cp1251" />
>
> and also some composite font
> <font font-family="Arial Unicode MS" catalog="Western" />
>
> I changed this in this both files and now pdf is displayed correctly.
>
> But now I have problem to export it to doc Microsoft Word:
> when i export it in word non English letters are shown as little
> squares. Font selected in word is Lucida Sans Typewriter.If I manually
> select text and then change font to Arial Unicode MS text is displayed OK.
> So which file do I have to change for correct Word document?
>
> Is it only fontsConfig_linux.xml???
>
> I tried to put Arial Unicode Ms instead on Lucida Sans Typewriter on one
> place (bolded one) but then I am getting format error corrupted document
> is not opened!!!
>
> <?xml version="1.0" encoding="UTF-8"?>
> <font>
> <font-aliases>
> <mapping name="serif" font-family="Lucida Bright" />
> <mapping name="sans serif" font-family="Lucida Sans" />
> <mapping name="monospace" font-family="Lucida Sans Typewriter" />
> <mapping name="cursive" font-family="Lucida Sans Typewriter" />
> <mapping name="fantasy" font-family="Lucida Sans Typewriter" />
> </font-aliases>
> <composite-font name="all-fonts" default="Arial Unicode MS">
> <font font-family="Lucida Sans Typewriter" catalog="Western" />
> <font font-family="ZYSong18030" catalog="Chinese" />
> <font font-family="Baekmuk Batang" catalog="Korean" />
> <font font-family="Kochi Mincho" catalog="Japanese" />
>
> </composite-font>
> </font>
>
>
> What do I have to change for correct word document?
> Thanks
Re: Export to DOC Microsoft Word Issue [message #882483 is a reply to message #881966] Wed, 06 June 2012 10:42 Go to previous messageGo to next message
Dejan Vujanic is currently offline Dejan Vujanic
Messages: 66
Registered: October 2011
Member
Thanks for reply Jason.

I am using Eclipse 3.4.4 and org.eclipse.birt.report.engine.fonts_2.3.2.r232_20090202v

do u know solution how to present it in Word also? I can not find such information on internet
Re: Export to DOC Microsoft Word Issue [message #882669 is a reply to message #882483] Wed, 06 June 2012 20:07 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

Any chance you could try this in a later version of BIRT?

Jason

On 6/6/2012 10:42 AM, Missing name Mising name wrote:
> Thanks for reply Jason.
>
> I am using Eclipse 3.4.4 and
> org.eclipse.birt.report.engine.fonts_2.3.2.r232_20090202v
>
> do u know solution how to present it in Word also? I can not find such
> information on internet
Re: Export to DOC Microsoft Word Issue [message #882724 is a reply to message #882669] Wed, 06 June 2012 23:46 Go to previous messageGo to next message
Dejan Vujanic is currently offline Dejan Vujanic
Messages: 66
Registered: October 2011
Member
I can't Jason because system in which I am importing does not support on example 3.7 Birt reports.I already tried.

fontsConfig_PDF is file for changing fonts for PDF but which file is for WORD.


Firstly I didn't change it to Arial Unicode and then I could open my document but all letters except for English ones, was displayed as little squares.
Does for correct Word format it is only enough to change fontConfig_linux? Why when I changed this to Arial_Unicode my PDF file also can not be opened? Like the change in this file also effects and PDF export which I finally managed to set. But how then to set font for correct WORD document? It is not problem on the WORD side because when I select text and change it manually in Arial Unicode WORD everything is OK.
If fontConfig linux is not supposed to be changed where then I have tto change this to some format other from Lucida for WORD?
Do I have some alternative?

Thanks
Re: Export to DOC Microsoft Word Issue [message #883112 is a reply to message #882724] Thu, 07 June 2012 17:38 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

I do not think the word emitter uses fontsConfig. I wanted you to try
the report in a separate 3.7.2 install to see if the issue has been
fixed in a later version of BIRT. You may want to look over these bugs:
https://bugs.eclipse.org/bugs/buglist.cgi?query_format=advanced;short_desc=word%20font;short_desc_type=allwordssubstr;product=BIRT;classification=BIRT

Jason


On 6/6/2012 11:46 PM, Missing name Mising name wrote:
> I can't Jason because system in which I am importing does not support on
> example 3.7 Birt reports.I already tried.
>
> fontsConfig_PDF is file for changing fonts for PDF but which file is for
> WORD.
>
>
> Firstly I didn't change it to Arial Unicode and then I could open my
> document but all letters except for English ones, was displayed as
> little squares.
> Does for correct Word format it is only enough to change
> fontConfig_linux? Why when I changed this to Arial_Unicode my PDF file
> also can not be opened? Like the change in this file also effects and
> PDF export which I finally managed to set. But how then to set font for
> correct WORD document? It is not problem on the WORD side because when I
> select text and change it manually in Arial Unicode WORD everything is OK.
> If fontConfig linux is not supposed to be changed where then I have tto
> change this to some format other from Lucida for WORD?
> Do I have some alternative?
>
> Thanks
>
Re: Export to DOC Microsoft Word Issue [message #884650 is a reply to message #883112] Mon, 11 June 2012 10:58 Go to previous messageGo to next message
Dejan Vujanic is currently offline Dejan Vujanic
Messages: 66
Registered: October 2011
Member
Unfortunately I can't test it in 3.7.2 because this IBM application does not support BIRT reports in this format.

Some guy wrote for his similar problem:
"Fixed.

Word can shift to the proper font if the user defined font can not display some
characters of a string. So we need not use the font-config. We just need to
handle the generic font mapping to make sure it is consonant with HTML and pdf
output."

But my does not shift to proper font? I saw that for all problem patches did not work.

Some othe guy wrote:
"Fixed. In word tag sz only applies for Asian and Latin fonts in a run. Add a
tag sz-cs to support complex script fonts in a run. "

Where to add this tags if this i solution?



Jason I think solution is to find where does BIRT or my application sets this Lucida font for default word export. I found it only in fontsConfig_linux. There must be some other place also what do you think? thanks

[Updated on: Mon, 11 June 2012 11:01]

Report message to a moderator

Re: Export to DOC Microsoft Word Issue [message #884732 is a reply to message #884650] Mon, 11 June 2012 13:31 Go to previous message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

I believe the sz-cs is in the word xml format. You may want to open a
bugzilla entry to see if any of the devs have a possible work around.

Jason

On 6/11/2012 10:58 AM, Missing name Mising name wrote:
> Unfortunately I can't test it in 3.7.2 because this IBM application does
> not support BIRT reports in this format.
>
> Some guy wrote for his similar problem:
> "Fixed.
>
> Word can shift to the proper font if the user defined font can not
> display some
> characters of a string. So we need not use the font-config. We just need to
> handle the generic font mapping to make sure it is consonant with HTML
> and pdf
> output."
>
> But my does not shift to proper font? I saw that for all problem patches
> did not work.
>
> Some othe guy wrote:
> "Fixed. In word tag sz only applies for Asian and Latin fonts in a run.
> Add a
> tag sz-cs to support complex script fonts in a run. "
>
> Where to add this tags if this i solution?
>
Previous Topic:Chart not visible when exporting to Excel
Next Topic:Debugging BIRT Source (2.6.0)
Goto Forum:
  


Current Time: Tue Jul 22 19:49:04 EDT 2014

Powered by FUDForum. Page generated in 0.01880 seconds