You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Krzysztof Podejma <kp...@gmail.com> on 2007/06/26 23:07:22 UTC

FOP default font

Hello,
I need polish characters in pdf files, so I have to set FOP default font to
Arial.
I've configured fop.xconf to use Arial and generated font files.
It works well when I change font-family for blocks in fo files but I don't
want to modify all files.
Do you happen to know how to do this?

Regards
Krzysztof Podejma

Re: FOP default font

Posted by Krzysztof Podejma <kp...@gmail.com>.
thanks for links
I see, no apache here ;[

Krzysztof

2007/6/28, Oleg Andreyev <td...@mail.ru>:
>
> E.g
> http://download.savannah.nongnu.org/releases/freefont/
> http://www.altlinux.com/index.php?module=sisyphus&package=gw-fonts-ttf
> http://www.unifont.org/fontguide/
>
> http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&cat_id=FontDownloads
>
> Sorry, I have no ready to use font with compatible licensing.
>
> Krzysztof Podejma пишет:
> > it is https://issues.apache.org/jira/browse/OFBIZ-1110
> >
> > can you give me a link to free UNICODE font?
> >
> > Krzysztof
> >
>

Re: FOP default font

Posted by Oleg Andreyev <td...@mail.ru>.
E.g
http://download.savannah.nongnu.org/releases/freefont/
http://www.altlinux.com/index.php?module=sisyphus&package=gw-fonts-ttf
http://www.unifont.org/fontguide/
http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&cat_id=FontDownloads

Sorry, I have no ready to use font with compatible licensing.

Krzysztof Podejma пишет:
> it is https://issues.apache.org/jira/browse/OFBIZ-1110
>
> can you give me a link to free UNICODE font?
>
> Krzysztof
>

Re: FOP default font

Posted by Krzysztof Podejma <kp...@gmail.com>.
it is https://issues.apache.org/jira/browse/OFBIZ-1110

can you give me a link to free UNICODE font?

Krzysztof

Re: FOP default font

Posted by Oleg Andreyev <td...@mail.ru>.
Krzysztof, I honestly tried to understand what for you need associating 
font with locale and I still don't understand this.
I believe it's my poor English.

Let's view FOP as "black box".
It receive as input stream of  UTF-8 encoded multibyte chars and 
generate PDF as output.
If input in Russian you will see Russian in PDF, if input in Polish - 
Polish. If input stream is an mixture chars in different languages, 
exactly the same mix you will see in PDF.   
This is true on the assumption of mentioned in tag font-family font(s) 
contains necessary chars (in opposite case you will see #). That's why 
we need to add in trunk any UNICODE font and use it as default.

If you want to play with locales (by any reason), it would be right to 
change input stream according to your needs, not the font.


P.S. Krzysztov, please create JIRA as you're originator of this discussion.


Krzysztof Podejma пишет:
> no, I want to associate font with locale
>
> i.e.  you have property file "defFonts.properties" let the key be "
> pdf.default.fontfamily" and in this file it is not set(default language
> reports are not changed) but in defFonts_pl_PL.properties you have 
> this key
> set to Arial in defFonts_ru.properties this key is set to  your Cyrillic
> font, so pdf font is based on user locale.
>
> 2007/6/28, Oleg Andreyev <td...@mail.ru>:
>>
>> Krzysztof,
>>
>> Let me some examples. I have attached to this message three quotation
>> generated with different locale (Russian, French and Italian).
>>
>> Font is Arial(TTF) from Windows XP. Nothing else.
>> Is that meet your case?
>>
>> Krzysztof Podejma пишет:
>> > Oleg,
>> > I'm thinking of a functionality that people from different countries
>> > working
>> > together,could make reports and share these reports in one system, by
>> > giving
>> > link or sth. if ofbiz can generate pdf's on fly, it is better to share
>> > link
>> > to report than save pdf and send by email.
>> > ofbiz can translate labels in such reports, so why not to use it? i.e.
>> if
>> > you generate report from sales with Russian locale and send me, I'll
>> > not be
>> > able to understand it. With this functionality you could send me a
>> > link to
>> > report and the report would be generated with polish locale and font,
>> > without any character breaks.
>> >
>> > Krzysztof Podejma
>> >
>> > 2007/6/28, Jacques Le Roux <ja...@les7arts.com>:
>> >>
>> >> +1 to move this interesting issue to dev ML
>> >>
>> >> Jacques
>> >>
>> >> De : "Oleg Andreyev" <td...@mail.ru>
>> >> > Hi Krzysztof,
>> >> >
>> >> > It's something wrong.
>> >> > To build multilanguage applications people invent UNICODE. To 
>> ensure
>> >> > unified look of a document anywhere Abobe was created Acrobat.
>> >> > Document created by FOP can be in any language (if used fonts have
>> >> that
>> >> > language section of course). PDF in Polish with embed fonts remain
>> >> > readable anywhere.
>> >> >
>> >> > Current OfBiz reports have no instructions what fonts must be used.
>> >> And
>> >> > it's bottom of the problem. Base-14 fonts must be available to
>> >> every PDF
>> >> > reader but not any reader is localized. I think we have to select
>> some
>> >> > widely used font (е.g Arial, TTF I think as low overhead), modify
>> >> > reports to use it, add in trunk all required  files.  In this
>> case  we
>> >> > obtain  printing that will work OOTB anywhere (I hope:-).
>> >> >
>> >> > What about move this thread to dev ML?
>> >> >
>> >> > Krzysztof Podejma пишет:
>> >> > > thanks for the link I'll check it.
>> >> > >
>> >> > > I thought about font parameterizing for one greater purpose.
>> >> Consider
>> >> > > multilingual system, now it is not possible to have reports in
>> >> Chinese
>> >> ,
>> >> > > Russian, French etc. on one build(at once). If it would be
>> >> possible to
>> >> > > associate font with locale and pass this font to reports, we
>> >> would get
>> >> > > truly
>> >> > > multilingual system. No more broken encoding, automatic
>> >> document/report
>> >> > > translation and etc.
>> >> > > Of course this would require teplates(table size etc.) for fonts
>> but
>> >> it
>> >> > > would work without it too.
>> >> > >
>> >> > > I have tested this and it works.
>> >> > >
>> >> > > placed
>> >> > > <#if (defaultFontFamily?exists)><#if (defaultFontFamily != "
>> >> > > pdf.default.fontfamily" && defaultFontFamily != "")>
>> >> > > font-family="${defaultFontFamily}" </#if></#if>
>> >> > > into <fo:page-sequence master-reference="main-page"> in
>> >> > > reportTemplate.fo.ftl
>> >> > >
>> >> > > <property-to-field field="defaultFontFamily" resource="general"
>> >> > > property="
>> >> > > pdf.default.fontfamily" default=""/>
>> >> > > into actions in FoReportDecorator
>> >> > >
>> >> > > pdf.default.fontfamily=Arial
>> >> > > into general.properties
>> >> > >
>> >> > > maybe it is not elegant but it works, test it with your font 
>> if you
>> >> like.
>> >> > >
>> >> > > Krzysztof Podejma
>> >> > >
>> >> > > 2007/6/28, Oleg Andreyev <td...@mail.ru>:
>> >> > >>
>> >> > >>
>> >> > >>
>> >> > >> Krzysztof Podejma пишет:
>> >> > >> > in trunk - current distribution default value would stay as it
>> is
>> >> now,
>> >> > >> > and
>> >> > >> > nobody will change it to font that use metrics that aren't in
>> >> trunk.
>> >> > >> > I think it is good idea to change default font in one place
>> >> instead
>> >> of
>> >> > >> > modifying all reports each.
>> >> > >> IMHO, for custom solutions replace works faster:) But you are
>> right
>> >> on
>> >> > >> the whole.
>> >> > >> >
>> >> > >> > if you want to have more than one font in your pdf you can
>> always
>> >> > >> > override a
>> >> > >> > font-family for block or for entire document.
>> >> > >> > this property would have ability to not take effect if not set
>> >> > >> >
>> >> > >> > Nobody wants to crash anything, we want to have less work
>> because
>> >> > >> we use
>> >> > >> > non-English characters and it is a pain to track all new pdf's
>> >> and
>> >> > >> > check if
>> >> > >> > they print correctly.
>> >> > >> >
>> >> > >> > +1 fop.xconf
>> >> > >> > AFAIK fop.xconf is necessary for custom fonts but you 
>> cannot set
>> >> > >> default
>> >> > >> > font in fop.xconf, correct me if I'm wrong
>> >> > >> http://xmlgraphics.apache.org/fop/0.93/fonts.html
>> >> > >> Pay attention to last topic. Theoretically if you have font
>> >> Helvetica
>> >> > >> you can embed it as any other.
>> >> > >>
>> >> > >>
>> >> > >> > We need this property because we have fop.xconf and font 
>> metrics
>> >> > >> > installed
>> >> > >> > and we don't want to modify and/or merge all pdf files.
>> >> > >> >
>> >> > >> > Krzysztof Podejma
>> >> > >> >
>> >> > >> > 2007/6/27, Oleg Andreyev <td...@mail.ru>:
>> >> > >> >>
>> >> > >> >> -1
>> >> > >> >> There are no universal solutions in this field.
>> >> > >> >> What's happened if somebody will add Arial(or Tahoma, or
>> >> something
>> >> > >> else)
>> >> > >> >> as value this property in current distribution?
>> >> > >> >> Nothing. Just another error message in log.
>> >> > >> >> I have the same problems with Cyrillic fonts but apart from
>> >> > >> accessible
>> >> > >> >> programmatically default font name we need right fop.xconf,
>> >> > >> metrics and
>> >> > >> >> fonts itself installed in the system. Such property may be
>> >> useful
>> >> > >> only
>> >> > >> >> if you well understand the rest configuration tasks. This 
>> is a
>> >> > >> point of
>> >> > >> >> mistake.
>> >> > >> >>
>> >> > >> >> As remark. I'd like to see standard fop.xconf in the 
>> trunk. One
>> >> from
>> >> > >> FOP
>> >> > >> >> distribution just well commented and can be used as guide by
>> new
>> >> > >> users
>> >> > >> >> and developers.
>> >> > >> >> https://issues.apache.org/jira/browse/OFBIZ-990
>> >> > >> >>
>> >> > >> >> If fop.xconf will in trunk, it would be rightly move page
>> >> > >> height/width
>> >> > >> >> to config as part of the localization process. Now these
>> >> hardcoded
>> >> > >> tags
>> >> > >> >> define Letter, not widely used paper format outside US.
>> >> > >> >>
>> >> > >> >>
>> >> > >> >> Krzysztof Podejma пишет:
>> >> > >> >> > yes me too +1 general.properties with default fop font
>> >> > >> >> >
>> >> > >> >> >
>> >> > >> >> > 2007/6/27, Jacques Le Roux <ja...@les7arts.com>:
>> >> > >> >> >>
>> >> > >> >> >> +1 for  general.properties
>> >> > >> >> >>
>> >> > >> >> >> Jacques
>> >> > >> >> >>
>> >> > >> >> >> De : "Krzysztof Podejma" <kp...@gmail.com>
>> >> > >> >> >> > big thanks it works perfect.
>> >> > >> >> >> > I think the pdf font should be parametrized somewhere in
>> >> > >> properties
>> >> > >> >> >> i.e
>> >> > >> >> >> > general.properties
>> >> > >> >> >> >
>> >> > >> >> >> > I've found that there are used two different fonts: one
>> >> when
>> >> you
>> >> > >> >> set
>> >> > >> >> >> > font-family="" and another one when you dont't specify
>> this
>> >> > >> >> attribute.
>> >> > >> >> >> > maybe the second one is set somewhere...
>> >> > >> >> >> >
>> >> > >> >> >> > Krzysztof Podejma
>> >> > >> >> >> >
>> >> > >> >> >> >
>> >> > >> >> >> > 2007/6/27, Christian Geisert
>> >> <ch...@isu-gmbh.de>:
>> >> > >> >> >> > >
>> >> > >> >> >> > > Krzysztof Podejma schrieb:
>> >> > >> >> >> > > > Hello,
>> >> > >> >> >> > > > I need polish characters in pdf files, so I have to
>> set
>> >> FOP
>> >> > >> >> >> default
>> >> > >> >> >> font
>> >> > >> >> >> > > to
>> >> > >> >> >> > > > Arial.
>> >> > >> >> >> > > > I've configured fop.xconf to use Arial and generated
>> >> font
>> >> > >> >> files.
>> >> > >> >> >> > > > It works well when I change font-family for blocks
>> >> in fo
>> >> > >> files
>> >> > >> >> >> but I
>> >> > >> >> >> > > don't
>> >> > >> >> >> > > > want to modify all files.
>> >> > >> >> >> > >
>> >> > >> >> >> > > You can declare the font-family in the fo:root element
>> >> which
>> >> > >> >> >> means you
>> >> > >> >> >> > > don't have to do it on every block, just once per
>> >> document.
>> >> > >> >> >> > >
>> >> > >> >> >> > > > Do you happen to know how to do this?
>> >> > >> >> >> > >
>> >> > >> >> >> > > The default-value for the font-family property is
>> >> 'sans-serif'
>> >> > >> >> >> > > (Helvetica) which is hard coded in FOP.
>> >> > >> >> >> > >
>> >> > >> >> >> > > But if you work with FoDecorator/FoReportDecorator -
>> >> which
>> >> you
>> >> > >> >> >> should
>> >> > >> >> >> > > should do IMHO - you can declare it there and don't
>> >> have to
>> >> > >> worry
>> >> > >> >> >> about
>> >> > >> >> >> > > in every report.
>> >> > >> >> >> > >
>> >> > >> >> >> > > --
>> >> > >> >> >> > > Christian
>> >> > >> >> >> > >
>> >> > >> >> >> > >
>> >> > >> >> >> > >
>> >> > >> >> >> >
>> >> > >> >> >>
>> >> > >> >> >
>> >> > >> >>
>> >> > >>
>> >> >
>> >>
>> >>
>>

Re: FOP default font

Posted by Krzysztof Podejma <kp...@gmail.com>.
no, I want to associate font with locale

i.e.  you have property file "defFonts.properties" let the key be "
pdf.default.fontfamily" and in this file it is not set(default language
reports are not changed) but in defFonts_pl_PL.properties you have this key
set to Arial in defFonts_ru.properties this key is set to  your Cyrillic
font, so pdf font is based on user locale.

2007/6/28, Oleg Andreyev <td...@mail.ru>:
>
> Krzysztof,
>
> Let me some examples. I have attached to this message three quotation
> generated with different locale (Russian, French and Italian).
>
> Font is Arial(TTF) from Windows XP. Nothing else.
> Is that meet your case?
>
> Krzysztof Podejma пишет:
> > Oleg,
> > I'm thinking of a functionality that people from different countries
> > working
> > together,could make reports and share these reports in one system, by
> > giving
> > link or sth. if ofbiz can generate pdf's on fly, it is better to share
> > link
> > to report than save pdf and send by email.
> > ofbiz can translate labels in such reports, so why not to use it? i.e.
> if
> > you generate report from sales with Russian locale and send me, I'll
> > not be
> > able to understand it. With this functionality you could send me a
> > link to
> > report and the report would be generated with polish locale and font,
> > without any character breaks.
> >
> > Krzysztof Podejma
> >
> > 2007/6/28, Jacques Le Roux <ja...@les7arts.com>:
> >>
> >> +1 to move this interesting issue to dev ML
> >>
> >> Jacques
> >>
> >> De : "Oleg Andreyev" <td...@mail.ru>
> >> > Hi Krzysztof,
> >> >
> >> > It's something wrong.
> >> > To build multilanguage applications people invent UNICODE. To ensure
> >> > unified look of a document anywhere Abobe was created Acrobat.
> >> > Document created by FOP can be in any language (if used fonts have
> >> that
> >> > language section of course). PDF in Polish with embed fonts remain
> >> > readable anywhere.
> >> >
> >> > Current OfBiz reports have no instructions what fonts must be used.
> >> And
> >> > it's bottom of the problem. Base-14 fonts must be available to
> >> every PDF
> >> > reader but not any reader is localized. I think we have to select
> some
> >> > widely used font (е.g Arial, TTF I think as low overhead), modify
> >> > reports to use it, add in trunk all required  files.  In this
> case  we
> >> > obtain  printing that will work OOTB anywhere (I hope:-).
> >> >
> >> > What about move this thread to dev ML?
> >> >
> >> > Krzysztof Podejma пишет:
> >> > > thanks for the link I'll check it.
> >> > >
> >> > > I thought about font parameterizing for one greater purpose.
> >> Consider
> >> > > multilingual system, now it is not possible to have reports in
> >> Chinese
> >> ,
> >> > > Russian, French etc. on one build(at once). If it would be
> >> possible to
> >> > > associate font with locale and pass this font to reports, we
> >> would get
> >> > > truly
> >> > > multilingual system. No more broken encoding, automatic
> >> document/report
> >> > > translation and etc.
> >> > > Of course this would require teplates(table size etc.) for fonts
> but
> >> it
> >> > > would work without it too.
> >> > >
> >> > > I have tested this and it works.
> >> > >
> >> > > placed
> >> > > <#if (defaultFontFamily?exists)><#if (defaultFontFamily != "
> >> > > pdf.default.fontfamily" && defaultFontFamily != "")>
> >> > > font-family="${defaultFontFamily}" </#if></#if>
> >> > > into <fo:page-sequence master-reference="main-page"> in
> >> > > reportTemplate.fo.ftl
> >> > >
> >> > > <property-to-field field="defaultFontFamily" resource="general"
> >> > > property="
> >> > > pdf.default.fontfamily" default=""/>
> >> > > into actions in FoReportDecorator
> >> > >
> >> > > pdf.default.fontfamily=Arial
> >> > > into general.properties
> >> > >
> >> > > maybe it is not elegant but it works, test it with your font if you
> >> like.
> >> > >
> >> > > Krzysztof Podejma
> >> > >
> >> > > 2007/6/28, Oleg Andreyev <td...@mail.ru>:
> >> > >>
> >> > >>
> >> > >>
> >> > >> Krzysztof Podejma пишет:
> >> > >> > in trunk - current distribution default value would stay as it
> is
> >> now,
> >> > >> > and
> >> > >> > nobody will change it to font that use metrics that aren't in
> >> trunk.
> >> > >> > I think it is good idea to change default font in one place
> >> instead
> >> of
> >> > >> > modifying all reports each.
> >> > >> IMHO, for custom solutions replace works faster:) But you are
> right
> >> on
> >> > >> the whole.
> >> > >> >
> >> > >> > if you want to have more than one font in your pdf you can
> always
> >> > >> > override a
> >> > >> > font-family for block or for entire document.
> >> > >> > this property would have ability to not take effect if not set
> >> > >> >
> >> > >> > Nobody wants to crash anything, we want to have less work
> because
> >> > >> we use
> >> > >> > non-English characters and it is a pain to track all new pdf's
> >> and
> >> > >> > check if
> >> > >> > they print correctly.
> >> > >> >
> >> > >> > +1 fop.xconf
> >> > >> > AFAIK fop.xconf is necessary for custom fonts but you cannot set
> >> > >> default
> >> > >> > font in fop.xconf, correct me if I'm wrong
> >> > >> http://xmlgraphics.apache.org/fop/0.93/fonts.html
> >> > >> Pay attention to last topic. Theoretically if you have font
> >> Helvetica
> >> > >> you can embed it as any other.
> >> > >>
> >> > >>
> >> > >> > We need this property because we have fop.xconf and font metrics
> >> > >> > installed
> >> > >> > and we don't want to modify and/or merge all pdf files.
> >> > >> >
> >> > >> > Krzysztof Podejma
> >> > >> >
> >> > >> > 2007/6/27, Oleg Andreyev <td...@mail.ru>:
> >> > >> >>
> >> > >> >> -1
> >> > >> >> There are no universal solutions in this field.
> >> > >> >> What's happened if somebody will add Arial(or Tahoma, or
> >> something
> >> > >> else)
> >> > >> >> as value this property in current distribution?
> >> > >> >> Nothing. Just another error message in log.
> >> > >> >> I have the same problems with Cyrillic fonts but apart from
> >> > >> accessible
> >> > >> >> programmatically default font name we need right fop.xconf,
> >> > >> metrics and
> >> > >> >> fonts itself installed in the system. Such property may be
> >> useful
> >> > >> only
> >> > >> >> if you well understand the rest configuration tasks. This is a
> >> > >> point of
> >> > >> >> mistake.
> >> > >> >>
> >> > >> >> As remark. I'd like to see standard fop.xconf in the trunk. One
> >> from
> >> > >> FOP
> >> > >> >> distribution just well commented and can be used as guide by
> new
> >> > >> users
> >> > >> >> and developers.
> >> > >> >> https://issues.apache.org/jira/browse/OFBIZ-990
> >> > >> >>
> >> > >> >> If fop.xconf will in trunk, it would be rightly move page
> >> > >> height/width
> >> > >> >> to config as part of the localization process. Now these
> >> hardcoded
> >> > >> tags
> >> > >> >> define Letter, not widely used paper format outside US.
> >> > >> >>
> >> > >> >>
> >> > >> >> Krzysztof Podejma пишет:
> >> > >> >> > yes me too +1 general.properties with default fop font
> >> > >> >> >
> >> > >> >> >
> >> > >> >> > 2007/6/27, Jacques Le Roux <ja...@les7arts.com>:
> >> > >> >> >>
> >> > >> >> >> +1 for  general.properties
> >> > >> >> >>
> >> > >> >> >> Jacques
> >> > >> >> >>
> >> > >> >> >> De : "Krzysztof Podejma" <kp...@gmail.com>
> >> > >> >> >> > big thanks it works perfect.
> >> > >> >> >> > I think the pdf font should be parametrized somewhere in
> >> > >> properties
> >> > >> >> >> i.e
> >> > >> >> >> > general.properties
> >> > >> >> >> >
> >> > >> >> >> > I've found that there are used two different fonts: one
> >> when
> >> you
> >> > >> >> set
> >> > >> >> >> > font-family="" and another one when you dont't specify
> this
> >> > >> >> attribute.
> >> > >> >> >> > maybe the second one is set somewhere...
> >> > >> >> >> >
> >> > >> >> >> > Krzysztof Podejma
> >> > >> >> >> >
> >> > >> >> >> >
> >> > >> >> >> > 2007/6/27, Christian Geisert
> >> <ch...@isu-gmbh.de>:
> >> > >> >> >> > >
> >> > >> >> >> > > Krzysztof Podejma schrieb:
> >> > >> >> >> > > > Hello,
> >> > >> >> >> > > > I need polish characters in pdf files, so I have to
> set
> >> FOP
> >> > >> >> >> default
> >> > >> >> >> font
> >> > >> >> >> > > to
> >> > >> >> >> > > > Arial.
> >> > >> >> >> > > > I've configured fop.xconf to use Arial and generated
> >> font
> >> > >> >> files.
> >> > >> >> >> > > > It works well when I change font-family for blocks
> >> in fo
> >> > >> files
> >> > >> >> >> but I
> >> > >> >> >> > > don't
> >> > >> >> >> > > > want to modify all files.
> >> > >> >> >> > >
> >> > >> >> >> > > You can declare the font-family in the fo:root element
> >> which
> >> > >> >> >> means you
> >> > >> >> >> > > don't have to do it on every block, just once per
> >> document.
> >> > >> >> >> > >
> >> > >> >> >> > > > Do you happen to know how to do this?
> >> > >> >> >> > >
> >> > >> >> >> > > The default-value for the font-family property is
> >> 'sans-serif'
> >> > >> >> >> > > (Helvetica) which is hard coded in FOP.
> >> > >> >> >> > >
> >> > >> >> >> > > But if you work with FoDecorator/FoReportDecorator -
> >> which
> >> you
> >> > >> >> >> should
> >> > >> >> >> > > should do IMHO - you can declare it there and don't
> >> have to
> >> > >> worry
> >> > >> >> >> about
> >> > >> >> >> > > in every report.
> >> > >> >> >> > >
> >> > >> >> >> > > --
> >> > >> >> >> > > Christian
> >> > >> >> >> > >
> >> > >> >> >> > >
> >> > >> >> >> > >
> >> > >> >> >> >
> >> > >> >> >>
> >> > >> >> >
> >> > >> >>
> >> > >>
> >> >
> >>
> >>
>

Re: FOP default font

Posted by Krzysztof Podejma <kp...@gmail.com>.
I agree with you report should remember at least first creation locale.
i.e. Invoices should stay the same whatever language is used.

2007/6/28, Chris Howe <cj...@yahoo.com>:
>
> Just to interject a potential complication (and potential solution)
> with this scenario.  When a pdf file is emailed, it becomes a static
> document (the data will always be the same, today, tomorrow, next
> year).  When it is a link, it remains dynamic.  In some instances you
> want the data to remain dynamic and in some instances you want it to be
> static.
>
> To maintain a static document and use the approach that you are
> suggesting, the data that exists when the document would have been
> created needs to be stored somewhere.  You likely will need to create a
> data document and store on the server so that the report can then be
> generated in the various languages on the fly.  XML is likely a better
> storage mechanism for most reports than is a RDBMS.  If you're using
> XML, an XML database is likely to be more beneficial than simple xml
> file storage.  And, there is already a basic implementation of an XML
> database in Jira (Xindice).
> FWIW,
> Chris
>
>
> --- Krzysztof Podejma <kp...@gmail.com> wrote:
>
> > Oleg,
> > I'm thinking of a functionality that people from different countries
> > working
> > together,could make reports and share these reports in one system, by
> > giving
> > link or sth. if ofbiz can generate pdf's on fly, it is better to
> > share link
> > to report than save pdf and send by email.
> > ofbiz can translate labels in such reports, so why not to use it?
> > i.e. if
> > you generate report from sales with Russian locale and send me, I'll
> > not be
> > able to understand it. With this functionality you could send me a
> > link to
> > report and the report would be generated with polish locale and font,
> > without any character breaks.
> >
> > Krzysztof Podejma
> >
> > 2007/6/28, Jacques Le Roux <ja...@les7arts.com>:
> > >
> > > +1 to move this interesting issue to dev ML
> > >
> > > Jacques
> > >
> > > De : "Oleg Andreyev" <td...@mail.ru>
> > > > Hi Krzysztof,
> > > >
> > > > It's something wrong.
> > > > To build multilanguage applications people invent UNICODE. To
> > ensure
> > > > unified look of a document anywhere Abobe was created Acrobat.
> > > > Document created by FOP can be in any language (if used fonts
> > have that
> > > > language section of course). PDF in Polish with embed fonts
> > remain
> > > > readable anywhere.
> > > >
> > > > Current OfBiz reports have no instructions what fonts must be
> > used. And
> > > > it's bottom of the problem. Base-14 fonts must be available to
> > every PDF
> > > > reader but not any reader is localized. I think we have to select
> > some
> > > > widely used font (е.g Arial, TTF I think as low overhead), modify
> > > > reports to use it, add in trunk all required  files.  In this
> > case  we
> > > > obtain  printing that will work OOTB anywhere (I hope:-).
> > > >
> > > > What about move this thread to dev ML?
> > > >
> > > > Krzysztof Podejma пишет:
> > > > > thanks for the link I'll check it.
> > > > >
> > > > > I thought about font parameterizing for one greater purpose.
> > Consider
> > > > > multilingual system, now it is not possible to have reports in
> > Chinese
> > > ,
> > > > > Russian, French etc. on one build(at once). If it would be
> > possible to
> > > > > associate font with locale and pass this font to reports, we
> > would get
> > > > > truly
> > > > > multilingual system. No more broken encoding, automatic
> > > document/report
> > > > > translation and etc.
> > > > > Of course this would require teplates(table size etc.) for
> > fonts but
> > > it
> > > > > would work without it too.
> > > > >
> > > > > I have tested this and it works.
> > > > >
> > > > > placed
> > > > > <#if (defaultFontFamily?exists)><#if (defaultFontFamily != "
> > > > > pdf.default.fontfamily" && defaultFontFamily != "")>
> > > > > font-family="${defaultFontFamily}" </#if></#if>
> > > > > into <fo:page-sequence master-reference="main-page"> in
> > > > > reportTemplate.fo.ftl
> > > > >
> > > > > <property-to-field field="defaultFontFamily" resource="general"
> > > > > property="
> > > > > pdf.default.fontfamily" default=""/>
> > > > > into actions in FoReportDecorator
> > > > >
> > > > > pdf.default.fontfamily=Arial
> > > > > into general.properties
> > > > >
> > > > > maybe it is not elegant but it works, test it with your font if
> > you
> > > like.
> > > > >
> > > > > Krzysztof Podejma
> > > > >
> > > > > 2007/6/28, Oleg Andreyev <td...@mail.ru>:
> > > > >>
> > > > >>
> > > > >>
> > > > >> Krzysztof Podejma пишет:
> > > > >> > in trunk - current distribution default value would stay as
> > it is
> > > now,
> > > > >> > and
> > > > >> > nobody will change it to font that use metrics that aren't
> > in
> > > trunk.
> > > > >> > I think it is good idea to change default font in one place
> > instead
> > > of
> > > > >> > modifying all reports each.
> > > > >> IMHO, for custom solutions replace works faster:) But you are
> > right
> > > on
> > > > >> the whole.
> > > > >> >
> > > > >> > if you want to have more than one font in your pdf you can
> > always
> > > > >> > override a
> > > > >> > font-family for block or for entire document.
> > > > >> > this property would have ability to not take effect if not
> > set
> > > > >> >
> > > > >> > Nobody wants to crash anything, we want to have less work
> > because
> > > > >> we use
> > > > >> > non-English characters and it is a pain to track all new
> > pdf's and
> > > > >> > check if
> > > > >> > they print correctly.
> > > > >> >
> > > > >> > +1 fop.xconf
> > > > >> > AFAIK fop.xconf is necessary for custom fonts but you cannot
> > set
> > > > >> default
> > > > >> > font in fop.xconf, correct me if I'm wrong
> > > > >> http://xmlgraphics.apache.org/fop/0.93/fonts.html
> > > > >> Pay attention to last topic. Theoretically if you have font
> > Helvetica
> > > > >> you can embed it as any other.
> > > > >>
> > > > >>
> > > > >> > We need this property because we have fop.xconf and font
> > metrics
> > > > >> > installed
> > > > >> > and we don't want to modify and/or merge all pdf files.
> > > > >> >
> > > > >> > Krzysztof Podejma
> > > > >> >
> > > > >> > 2007/6/27, Oleg Andreyev <td...@mail.ru>:
> > > > >> >>
> > > > >> >> -1
> > > > >> >> There are no universal solutions in this field.
> > > > >> >> What's happened if somebody will add Arial(or Tahoma, or
> > something
> > > > >> else)
> > > > >> >> as value this property in current distribution?
> > > > >> >> Nothing. Just another error message in log.
> > > > >> >> I have the same problems with Cyrillic fonts but apart from
> > > > >> accessible
> > > > >> >> programmatically default font name we need right fop.xconf,
> > > > >> metrics and
> > > > >> >> fonts itself installed in the system. Such property may be
> > useful
> > > > >> only
> > > > >> >> if you well understand the rest configuration tasks. This
> > is a
> > > > >> point of
> > > > >> >> mistake.
> > > > >> >>
> > > > >> >> As remark. I'd like to see standard fop.xconf in the trunk.
> > One
> > > from
> > > > >> FOP
> > > > >> >> distribution just well commented and can be used as guide
> > by new
> > > > >> users
> > > > >> >> and developers.
> > > > >> >> https://issues.apache.org/jira/browse/OFBIZ-990
> > > > >> >>
> > > > >> >> If fop.xconf will in trunk, it would be rightly move page
> > > > >> height/width
> > > > >> >> to config as part of the localization process. Now these
> > hardcoded
> > > > >> tags
> > > > >> >> define Letter, not widely used paper format outside US.
> > > > >> >>
> > > > >> >>
> > > > >> >> Krzysztof Podejma пишет:
> > > > >> >> > yes me too +1 general.properties with default fop font
> > > > >> >> >
> > > > >> >> >
> > > > >> >> > 2007/6/27, Jacques Le Roux
> > <ja...@les7arts.com>:
> > > > >> >> >>
> > > > >> >> >> +1 for  general.properties
> > > > >> >> >>
> > > > >> >> >> Jacques
> > > > >> >> >>
> > > > >> >> >> De : "Krzysztof Podejma" <kp...@gmail.com>
> > > > >> >> >> > big thanks it works perfect.
> >
> === message truncated ===
>
>

Re: FOP default font

Posted by Oleg Andreyev <td...@mail.ru>.
Krzysztof,

Attachments cutted off. By word of mouth, each report have fixed text 
data (labels) in correct language. Content is in Russian of course.

Oleg Andreyev пишет:
> Krzysztof,
>
> Let me some examples. I have attached to this message three quotation 
> generated with different locale (Russian, French and Italian).
>
> Font is Arial(TTF) from Windows XP. Nothing else.
> Is that meet your case?
>
> Krzysztof Podejma пишет:
>> Oleg,
>> I'm thinking of a functionality that people from different countries 
>> working
>> together,could make reports and share these reports in one system, by 
>> giving
>> link or sth. if ofbiz can generate pdf's on fly, it is better to 
>> share link
>> to report than save pdf and send by email.
>> ofbiz can translate labels in such reports, so why not to use it? 
>> i.e. if
>> you generate report from sales with Russian locale and send me, I'll 
>> not be
>> able to understand it. With this functionality you could send me a 
>> link to
>> report and the report would be generated with polish locale and font,
>> without any character breaks.
>>
>> Krzysztof Podejma
>>
>> 2007/6/28, Jacques Le Roux <ja...@les7arts.com>:
>>>
>>> +1 to move this interesting issue to dev ML
>>>
>>> Jacques
>>>
>>> De : "Oleg Andreyev" <td...@mail.ru>
>>> > Hi Krzysztof,
>>> >
>>> > It's something wrong.
>>> > To build multilanguage applications people invent UNICODE. To ensure
>>> > unified look of a document anywhere Abobe was created Acrobat.
>>> > Document created by FOP can be in any language (if used fonts have 
>>> that
>>> > language section of course). PDF in Polish with embed fonts remain
>>> > readable anywhere.
>>> >
>>> > Current OfBiz reports have no instructions what fonts must be 
>>> used. And
>>> > it's bottom of the problem. Base-14 fonts must be available to 
>>> every PDF
>>> > reader but not any reader is localized. I think we have to select 
>>> some
>>> > widely used font (е.g Arial, TTF I think as low overhead), modify
>>> > reports to use it, add in trunk all required  files.  In this 
>>> case  we
>>> > obtain  printing that will work OOTB anywhere (I hope:-).
>>> >
>>> > What about move this thread to dev ML?
>>> >
>>> > Krzysztof Podejma пишет:
>>> > > thanks for the link I'll check it.
>>> > >
>>> > > I thought about font parameterizing for one greater purpose. 
>>> Consider
>>> > > multilingual system, now it is not possible to have reports in 
>>> Chinese
>>> ,
>>> > > Russian, French etc. on one build(at once). If it would be 
>>> possible to
>>> > > associate font with locale and pass this font to reports, we 
>>> would get
>>> > > truly
>>> > > multilingual system. No more broken encoding, automatic
>>> document/report
>>> > > translation and etc.
>>> > > Of course this would require teplates(table size etc.) for fonts 
>>> but
>>> it
>>> > > would work without it too.
>>> > >
>>> > > I have tested this and it works.
>>> > >
>>> > > placed
>>> > > <#if (defaultFontFamily?exists)><#if (defaultFontFamily != "
>>> > > pdf.default.fontfamily" && defaultFontFamily != "")>
>>> > > font-family="${defaultFontFamily}" </#if></#if>
>>> > > into <fo:page-sequence master-reference="main-page"> in
>>> > > reportTemplate.fo.ftl
>>> > >
>>> > > <property-to-field field="defaultFontFamily" resource="general"
>>> > > property="
>>> > > pdf.default.fontfamily" default=""/>
>>> > > into actions in FoReportDecorator
>>> > >
>>> > > pdf.default.fontfamily=Arial
>>> > > into general.properties
>>> > >
>>> > > maybe it is not elegant but it works, test it with your font if you
>>> like.
>>> > >
>>> > > Krzysztof Podejma
>>> > >
>>> > > 2007/6/28, Oleg Andreyev <td...@mail.ru>:
>>> > >>
>>> > >>
>>> > >>
>>> > >> Krzysztof Podejma пишет:
>>> > >> > in trunk - current distribution default value would stay as 
>>> it is
>>> now,
>>> > >> > and
>>> > >> > nobody will change it to font that use metrics that aren't in
>>> trunk.
>>> > >> > I think it is good idea to change default font in one place 
>>> instead
>>> of
>>> > >> > modifying all reports each.
>>> > >> IMHO, for custom solutions replace works faster:) But you are 
>>> right
>>> on
>>> > >> the whole.
>>> > >> >
>>> > >> > if you want to have more than one font in your pdf you can 
>>> always
>>> > >> > override a
>>> > >> > font-family for block or for entire document.
>>> > >> > this property would have ability to not take effect if not set
>>> > >> >
>>> > >> > Nobody wants to crash anything, we want to have less work 
>>> because
>>> > >> we use
>>> > >> > non-English characters and it is a pain to track all new 
>>> pdf's and
>>> > >> > check if
>>> > >> > they print correctly.
>>> > >> >
>>> > >> > +1 fop.xconf
>>> > >> > AFAIK fop.xconf is necessary for custom fonts but you cannot set
>>> > >> default
>>> > >> > font in fop.xconf, correct me if I'm wrong
>>> > >> http://xmlgraphics.apache.org/fop/0.93/fonts.html
>>> > >> Pay attention to last topic. Theoretically if you have font 
>>> Helvetica
>>> > >> you can embed it as any other.
>>> > >>
>>> > >>
>>> > >> > We need this property because we have fop.xconf and font metrics
>>> > >> > installed
>>> > >> > and we don't want to modify and/or merge all pdf files.
>>> > >> >
>>> > >> > Krzysztof Podejma
>>> > >> >
>>> > >> > 2007/6/27, Oleg Andreyev <td...@mail.ru>:
>>> > >> >>
>>> > >> >> -1
>>> > >> >> There are no universal solutions in this field.
>>> > >> >> What's happened if somebody will add Arial(or Tahoma, or 
>>> something
>>> > >> else)
>>> > >> >> as value this property in current distribution?
>>> > >> >> Nothing. Just another error message in log.
>>> > >> >> I have the same problems with Cyrillic fonts but apart from
>>> > >> accessible
>>> > >> >> programmatically default font name we need right fop.xconf,
>>> > >> metrics and
>>> > >> >> fonts itself installed in the system. Such property may be 
>>> useful
>>> > >> only
>>> > >> >> if you well understand the rest configuration tasks. This is a
>>> > >> point of
>>> > >> >> mistake.
>>> > >> >>
>>> > >> >> As remark. I'd like to see standard fop.xconf in the trunk. One
>>> from
>>> > >> FOP
>>> > >> >> distribution just well commented and can be used as guide by 
>>> new
>>> > >> users
>>> > >> >> and developers.
>>> > >> >> https://issues.apache.org/jira/browse/OFBIZ-990
>>> > >> >>
>>> > >> >> If fop.xconf will in trunk, it would be rightly move page
>>> > >> height/width
>>> > >> >> to config as part of the localization process. Now these 
>>> hardcoded
>>> > >> tags
>>> > >> >> define Letter, not widely used paper format outside US.
>>> > >> >>
>>> > >> >>
>>> > >> >> Krzysztof Podejma пишет:
>>> > >> >> > yes me too +1 general.properties with default fop font
>>> > >> >> >
>>> > >> >> >
>>> > >> >> > 2007/6/27, Jacques Le Roux <ja...@les7arts.com>:
>>> > >> >> >>
>>> > >> >> >> +1 for  general.properties
>>> > >> >> >>
>>> > >> >> >> Jacques
>>> > >> >> >>
>>> > >> >> >> De : "Krzysztof Podejma" <kp...@gmail.com>
>>> > >> >> >> > big thanks it works perfect.
>>> > >> >> >> > I think the pdf font should be parametrized somewhere in
>>> > >> properties
>>> > >> >> >> i.e
>>> > >> >> >> > general.properties
>>> > >> >> >> >
>>> > >> >> >> > I've found that there are used two different fonts: one 
>>> when
>>> you
>>> > >> >> set
>>> > >> >> >> > font-family="" and another one when you dont't specify 
>>> this
>>> > >> >> attribute.
>>> > >> >> >> > maybe the second one is set somewhere...
>>> > >> >> >> >
>>> > >> >> >> > Krzysztof Podejma
>>> > >> >> >> >
>>> > >> >> >> >
>>> > >> >> >> > 2007/6/27, Christian Geisert 
>>> <ch...@isu-gmbh.de>:
>>> > >> >> >> > >
>>> > >> >> >> > > Krzysztof Podejma schrieb:
>>> > >> >> >> > > > Hello,
>>> > >> >> >> > > > I need polish characters in pdf files, so I have to 
>>> set
>>> FOP
>>> > >> >> >> default
>>> > >> >> >> font
>>> > >> >> >> > > to
>>> > >> >> >> > > > Arial.
>>> > >> >> >> > > > I've configured fop.xconf to use Arial and 
>>> generated font
>>> > >> >> files.
>>> > >> >> >> > > > It works well when I change font-family for blocks 
>>> in fo
>>> > >> files
>>> > >> >> >> but I
>>> > >> >> >> > > don't
>>> > >> >> >> > > > want to modify all files.
>>> > >> >> >> > >
>>> > >> >> >> > > You can declare the font-family in the fo:root element
>>> which
>>> > >> >> >> means you
>>> > >> >> >> > > don't have to do it on every block, just once per 
>>> document.
>>> > >> >> >> > >
>>> > >> >> >> > > > Do you happen to know how to do this?
>>> > >> >> >> > >
>>> > >> >> >> > > The default-value for the font-family property is
>>> 'sans-serif'
>>> > >> >> >> > > (Helvetica) which is hard coded in FOP.
>>> > >> >> >> > >
>>> > >> >> >> > > But if you work with FoDecorator/FoReportDecorator - 
>>> which
>>> you
>>> > >> >> >> should
>>> > >> >> >> > > should do IMHO - you can declare it there and don't 
>>> have to
>>> > >> worry
>>> > >> >> >> about
>>> > >> >> >> > > in every report.
>>> > >> >> >> > >
>>> > >> >> >> > > --
>>> > >> >> >> > > Christian
>>> > >> >> >> > >
>>> > >> >> >> > >
>>> > >> >> >> > >
>>> > >> >> >> >
>>> > >> >> >>
>>> > >> >> >
>>> > >> >>
>>> > >>
>>> >
>>>
>>>

Re: FOP default font

Posted by Krzysztof Podejma <kp...@gmail.com>.
+1 for jira issue (improvement)

2007/6/28, Jacques Le Roux <ja...@les7arts.com>:
>
> Oleg,
>
> OFBiz (Apache at large) MLs do not support attachments. I suggest to
> create a Jira issue to put all the valuable informations you
> exchanged with Krzysztof
>
> Thanks
>
> Jacques
>
> De : "Oleg Andreyev" <td...@mail.ru>
> > Krzysztof,
> >
> > Let me some examples. I have attached to this message three quotation
> > generated with different locale (Russian, French and Italian).
> >
> > Font is Arial(TTF) from Windows XP. Nothing else.
> > Is that meet your case?
> >
> > Krzysztof Podejma пишет:
> > > Oleg,
> > > I'm thinking of a functionality that people from different countries
> > > working
> > > together,could make reports and share these reports in one system, by
> > > giving
> > > link or sth. if ofbiz can generate pdf's on fly, it is better to share
> > > link
> > > to report than save pdf and send by email.
> > > ofbiz can translate labels in such reports, so why not to use it? i.e.
> if
> > > you generate report from sales with Russian locale and send me, I'll
> > > not be
> > > able to understand it. With this functionality you could send me a
> > > link to
> > > report and the report would be generated with polish locale and font,
> > > without any character breaks.
> > >
> > > Krzysztof Podejma
> > >
> > > 2007/6/28, Jacques Le Roux <ja...@les7arts.com>:
> > >>
> > >> +1 to move this interesting issue to dev ML
> > >>
> > >> Jacques
> > >>
> > >> De : "Oleg Andreyev" <td...@mail.ru>
> > >> > Hi Krzysztof,
> > >> >
> > >> > It's something wrong.
> > >> > To build multilanguage applications people invent UNICODE. To
> ensure
> > >> > unified look of a document anywhere Abobe was created Acrobat.
> > >> > Document created by FOP can be in any language (if used fonts have
> > >> that
> > >> > language section of course). PDF in Polish with embed fonts remain
> > >> > readable anywhere.
> > >> >
> > >> > Current OfBiz reports have no instructions what fonts must be used.
> > >> And
> > >> > it's bottom of the problem. Base-14 fonts must be available to
> > >> every PDF
> > >> > reader but not any reader is localized. I think we have to select
> some
> > >> > widely used font (е.g Arial, TTF I think as low overhead), modify
> > >> > reports to use it, add in trunk all required  files.  In this
> case  we
> > >> > obtain  printing that will work OOTB anywhere (I hope:-).
> > >> >
> > >> > What about move this thread to dev ML?
> > >> >
> > >> > Krzysztof Podejma пишет:
> > >> > > thanks for the link I'll check it.
> > >> > >
> > >> > > I thought about font parameterizing for one greater purpose.
> > >> Consider
> > >> > > multilingual system, now it is not possible to have reports in
> > >> Chinese
> > >> ,
> > >> > > Russian, French etc. on one build(at once). If it would be
> > >> possible to
> > >> > > associate font with locale and pass this font to reports, we
> > >> would get
> > >> > > truly
> > >> > > multilingual system. No more broken encoding, automatic
> > >> document/report
> > >> > > translation and etc.
> > >> > > Of course this would require teplates(table size etc.) for fonts
> but
> > >> it
> > >> > > would work without it too.
> > >> > >
> > >> > > I have tested this and it works.
> > >> > >
> > >> > > placed
> > >> > > <#if (defaultFontFamily?exists)><#if (defaultFontFamily != "
> > >> > > pdf.default.fontfamily" && defaultFontFamily != "")>
> > >> > > font-family="${defaultFontFamily}" </#if></#if>
> > >> > > into <fo:page-sequence master-reference="main-page"> in
> > >> > > reportTemplate.fo.ftl
> > >> > >
> > >> > > <property-to-field field="defaultFontFamily" resource="general"
> > >> > > property="
> > >> > > pdf.default.fontfamily" default=""/>
> > >> > > into actions in FoReportDecorator
> > >> > >
> > >> > > pdf.default.fontfamily=Arial
> > >> > > into general.properties
> > >> > >
> > >> > > maybe it is not elegant but it works, test it with your font if
> you
> > >> like.
> > >> > >
> > >> > > Krzysztof Podejma
> > >> > >
> > >> > > 2007/6/28, Oleg Andreyev <td...@mail.ru>:
> > >> > >>
> > >> > >>
> > >> > >>
> > >> > >> Krzysztof Podejma пишет:
> > >> > >> > in trunk - current distribution default value would stay as it
> is
> > >> now,
> > >> > >> > and
> > >> > >> > nobody will change it to font that use metrics that aren't in
> > >> trunk.
> > >> > >> > I think it is good idea to change default font in one place
> > >> instead
> > >> of
> > >> > >> > modifying all reports each.
> > >> > >> IMHO, for custom solutions replace works faster:) But you are
> right
> > >> on
> > >> > >> the whole.
> > >> > >> >
> > >> > >> > if you want to have more than one font in your pdf you can
> always
> > >> > >> > override a
> > >> > >> > font-family for block or for entire document.
> > >> > >> > this property would have ability to not take effect if not set
> > >> > >> >
> > >> > >> > Nobody wants to crash anything, we want to have less work
> because
> > >> > >> we use
> > >> > >> > non-English characters and it is a pain to track all new pdf's
> > >> and
> > >> > >> > check if
> > >> > >> > they print correctly.
> > >> > >> >
> > >> > >> > +1 fop.xconf
> > >> > >> > AFAIK fop.xconf is necessary for custom fonts but you cannot
> set
> > >> > >> default
> > >> > >> > font in fop.xconf, correct me if I'm wrong
> > >> > >> http://xmlgraphics.apache.org/fop/0.93/fonts.html
> > >> > >> Pay attention to last topic. Theoretically if you have font
> > >> Helvetica
> > >> > >> you can embed it as any other.
> > >> > >>
> > >> > >>
> > >> > >> > We need this property because we have fop.xconf and font
> metrics
> > >> > >> > installed
> > >> > >> > and we don't want to modify and/or merge all pdf files.
> > >> > >> >
> > >> > >> > Krzysztof Podejma
> > >> > >> >
> > >> > >> > 2007/6/27, Oleg Andreyev <td...@mail.ru>:
> > >> > >> >>
> > >> > >> >> -1
> > >> > >> >> There are no universal solutions in this field.
> > >> > >> >> What's happened if somebody will add Arial(or Tahoma, or
> > >> something
> > >> > >> else)
> > >> > >> >> as value this property in current distribution?
> > >> > >> >> Nothing. Just another error message in log.
> > >> > >> >> I have the same problems with Cyrillic fonts but apart from
> > >> > >> accessible
> > >> > >> >> programmatically default font name we need right fop.xconf,
> > >> > >> metrics and
> > >> > >> >> fonts itself installed in the system. Such property may be
> > >> useful
> > >> > >> only
> > >> > >> >> if you well understand the rest configuration tasks. This is
> a
> > >> > >> point of
> > >> > >> >> mistake.
> > >> > >> >>
> > >> > >> >> As remark. I'd like to see standard fop.xconf in the trunk.
> One
> > >> from
> > >> > >> FOP
> > >> > >> >> distribution just well commented and can be used as guide by
> new
> > >> > >> users
> > >> > >> >> and developers.
> > >> > >> >> https://issues.apache.org/jira/browse/OFBIZ-990
> > >> > >> >>
> > >> > >> >> If fop.xconf will in trunk, it would be rightly move page
> > >> > >> height/width
> > >> > >> >> to config as part of the localization process. Now these
> > >> hardcoded
> > >> > >> tags
> > >> > >> >> define Letter, not widely used paper format outside US.
> > >> > >> >>
> > >> > >> >>
> > >> > >> >> Krzysztof Podejma пишет:
> > >> > >> >> > yes me too +1 general.properties with default fop font
> > >> > >> >> >
> > >> > >> >> >
> > >> > >> >> > 2007/6/27, Jacques Le Roux <ja...@les7arts.com>:
> > >> > >> >> >>
> > >> > >> >> >> +1 for  general.properties
> > >> > >> >> >>
> > >> > >> >> >> Jacques
> > >> > >> >> >>
> > >> > >> >> >> De : "Krzysztof Podejma" <kp...@gmail.com>
> > >> > >> >> >> > big thanks it works perfect.
> > >> > >> >> >> > I think the pdf font should be parametrized somewhere in
> > >> > >> properties
> > >> > >> >> >> i.e
> > >> > >> >> >> > general.properties
> > >> > >> >> >> >
> > >> > >> >> >> > I've found that there are used two different fonts: one
> > >> when
> > >> you
> > >> > >> >> set
> > >> > >> >> >> > font-family="" and another one when you dont't specify
> this
> > >> > >> >> attribute.
> > >> > >> >> >> > maybe the second one is set somewhere...
> > >> > >> >> >> >
> > >> > >> >> >> > Krzysztof Podejma
> > >> > >> >> >> >
> > >> > >> >> >> >
> > >> > >> >> >> > 2007/6/27, Christian Geisert
> > >> <ch...@isu-gmbh.de>:
> > >> > >> >> >> > >
> > >> > >> >> >> > > Krzysztof Podejma schrieb:
> > >> > >> >> >> > > > Hello,
> > >> > >> >> >> > > > I need polish characters in pdf files, so I have to
> set
> > >> FOP
> > >> > >> >> >> default
> > >> > >> >> >> font
> > >> > >> >> >> > > to
> > >> > >> >> >> > > > Arial.
> > >> > >> >> >> > > > I've configured fop.xconf to use Arial and generated
> > >> font
> > >> > >> >> files.
> > >> > >> >> >> > > > It works well when I change font-family for blocks
> > >> in fo
> > >> > >> files
> > >> > >> >> >> but I
> > >> > >> >> >> > > don't
> > >> > >> >> >> > > > want to modify all files.
> > >> > >> >> >> > >
> > >> > >> >> >> > > You can declare the font-family in the fo:root element
> > >> which
> > >> > >> >> >> means you
> > >> > >> >> >> > > don't have to do it on every block, just once per
> > >> document.
> > >> > >> >> >> > >
> > >> > >> >> >> > > > Do you happen to know how to do this?
> > >> > >> >> >> > >
> > >> > >> >> >> > > The default-value for the font-family property is
> > >> 'sans-serif'
> > >> > >> >> >> > > (Helvetica) which is hard coded in FOP.
> > >> > >> >> >> > >
> > >> > >> >> >> > > But if you work with FoDecorator/FoReportDecorator -
> > >> which
> > >> you
> > >> > >> >> >> should
> > >> > >> >> >> > > should do IMHO - you can declare it there and don't
> > >> have to
> > >> > >> worry
> > >> > >> >> >> about
> > >> > >> >> >> > > in every report.
> > >> > >> >> >> > >
> > >> > >> >> >> > > --
> > >> > >> >> >> > > Christian
> > >> > >> >> >> > >
> > >> > >> >> >> > >
> > >> > >> >> >> > >
> > >> > >> >> >> >
> > >> > >> >> >>
> > >> > >> >> >
> > >> > >> >>
> > >> > >>
> > >> >
> > >>
> > >>
> >
>
>

Re: FOP default font

Posted by Jacques Le Roux <ja...@les7arts.com>.
Oleg,

OFBiz (Apache at large) MLs do not support attachments. I suggest to create a Jira issue to put all the valuable informations you
exchanged with Krzysztof

Thanks

Jacques

De : "Oleg Andreyev" <td...@mail.ru>
> Krzysztof,
>
> Let me some examples. I have attached to this message three quotation
> generated with different locale (Russian, French and Italian).
>
> Font is Arial(TTF) from Windows XP. Nothing else.
> Is that meet your case?
>
> Krzysztof Podejma пишет:
> > Oleg,
> > I'm thinking of a functionality that people from different countries
> > working
> > together,could make reports and share these reports in one system, by
> > giving
> > link or sth. if ofbiz can generate pdf's on fly, it is better to share
> > link
> > to report than save pdf and send by email.
> > ofbiz can translate labels in such reports, so why not to use it? i.e. if
> > you generate report from sales with Russian locale and send me, I'll
> > not be
> > able to understand it. With this functionality you could send me a
> > link to
> > report and the report would be generated with polish locale and font,
> > without any character breaks.
> >
> > Krzysztof Podejma
> >
> > 2007/6/28, Jacques Le Roux <ja...@les7arts.com>:
> >>
> >> +1 to move this interesting issue to dev ML
> >>
> >> Jacques
> >>
> >> De : "Oleg Andreyev" <td...@mail.ru>
> >> > Hi Krzysztof,
> >> >
> >> > It's something wrong.
> >> > To build multilanguage applications people invent UNICODE. To ensure
> >> > unified look of a document anywhere Abobe was created Acrobat.
> >> > Document created by FOP can be in any language (if used fonts have
> >> that
> >> > language section of course). PDF in Polish with embed fonts remain
> >> > readable anywhere.
> >> >
> >> > Current OfBiz reports have no instructions what fonts must be used.
> >> And
> >> > it's bottom of the problem. Base-14 fonts must be available to
> >> every PDF
> >> > reader but not any reader is localized. I think we have to select some
> >> > widely used font (е.g Arial, TTF I think as low overhead), modify
> >> > reports to use it, add in trunk all required  files.  In this case  we
> >> > obtain  printing that will work OOTB anywhere (I hope:-).
> >> >
> >> > What about move this thread to dev ML?
> >> >
> >> > Krzysztof Podejma пишет:
> >> > > thanks for the link I'll check it.
> >> > >
> >> > > I thought about font parameterizing for one greater purpose.
> >> Consider
> >> > > multilingual system, now it is not possible to have reports in
> >> Chinese
> >> ,
> >> > > Russian, French etc. on one build(at once). If it would be
> >> possible to
> >> > > associate font with locale and pass this font to reports, we
> >> would get
> >> > > truly
> >> > > multilingual system. No more broken encoding, automatic
> >> document/report
> >> > > translation and etc.
> >> > > Of course this would require teplates(table size etc.) for fonts but
> >> it
> >> > > would work without it too.
> >> > >
> >> > > I have tested this and it works.
> >> > >
> >> > > placed
> >> > > <#if (defaultFontFamily?exists)><#if (defaultFontFamily != "
> >> > > pdf.default.fontfamily" && defaultFontFamily != "")>
> >> > > font-family="${defaultFontFamily}" </#if></#if>
> >> > > into <fo:page-sequence master-reference="main-page"> in
> >> > > reportTemplate.fo.ftl
> >> > >
> >> > > <property-to-field field="defaultFontFamily" resource="general"
> >> > > property="
> >> > > pdf.default.fontfamily" default=""/>
> >> > > into actions in FoReportDecorator
> >> > >
> >> > > pdf.default.fontfamily=Arial
> >> > > into general.properties
> >> > >
> >> > > maybe it is not elegant but it works, test it with your font if you
> >> like.
> >> > >
> >> > > Krzysztof Podejma
> >> > >
> >> > > 2007/6/28, Oleg Andreyev <td...@mail.ru>:
> >> > >>
> >> > >>
> >> > >>
> >> > >> Krzysztof Podejma пишет:
> >> > >> > in trunk - current distribution default value would stay as it is
> >> now,
> >> > >> > and
> >> > >> > nobody will change it to font that use metrics that aren't in
> >> trunk.
> >> > >> > I think it is good idea to change default font in one place
> >> instead
> >> of
> >> > >> > modifying all reports each.
> >> > >> IMHO, for custom solutions replace works faster:) But you are right
> >> on
> >> > >> the whole.
> >> > >> >
> >> > >> > if you want to have more than one font in your pdf you can always
> >> > >> > override a
> >> > >> > font-family for block or for entire document.
> >> > >> > this property would have ability to not take effect if not set
> >> > >> >
> >> > >> > Nobody wants to crash anything, we want to have less work because
> >> > >> we use
> >> > >> > non-English characters and it is a pain to track all new pdf's
> >> and
> >> > >> > check if
> >> > >> > they print correctly.
> >> > >> >
> >> > >> > +1 fop.xconf
> >> > >> > AFAIK fop.xconf is necessary for custom fonts but you cannot set
> >> > >> default
> >> > >> > font in fop.xconf, correct me if I'm wrong
> >> > >> http://xmlgraphics.apache.org/fop/0.93/fonts.html
> >> > >> Pay attention to last topic. Theoretically if you have font
> >> Helvetica
> >> > >> you can embed it as any other.
> >> > >>
> >> > >>
> >> > >> > We need this property because we have fop.xconf and font metrics
> >> > >> > installed
> >> > >> > and we don't want to modify and/or merge all pdf files.
> >> > >> >
> >> > >> > Krzysztof Podejma
> >> > >> >
> >> > >> > 2007/6/27, Oleg Andreyev <td...@mail.ru>:
> >> > >> >>
> >> > >> >> -1
> >> > >> >> There are no universal solutions in this field.
> >> > >> >> What's happened if somebody will add Arial(or Tahoma, or
> >> something
> >> > >> else)
> >> > >> >> as value this property in current distribution?
> >> > >> >> Nothing. Just another error message in log.
> >> > >> >> I have the same problems with Cyrillic fonts but apart from
> >> > >> accessible
> >> > >> >> programmatically default font name we need right fop.xconf,
> >> > >> metrics and
> >> > >> >> fonts itself installed in the system. Such property may be
> >> useful
> >> > >> only
> >> > >> >> if you well understand the rest configuration tasks. This is a
> >> > >> point of
> >> > >> >> mistake.
> >> > >> >>
> >> > >> >> As remark. I'd like to see standard fop.xconf in the trunk. One
> >> from
> >> > >> FOP
> >> > >> >> distribution just well commented and can be used as guide by new
> >> > >> users
> >> > >> >> and developers.
> >> > >> >> https://issues.apache.org/jira/browse/OFBIZ-990
> >> > >> >>
> >> > >> >> If fop.xconf will in trunk, it would be rightly move page
> >> > >> height/width
> >> > >> >> to config as part of the localization process. Now these
> >> hardcoded
> >> > >> tags
> >> > >> >> define Letter, not widely used paper format outside US.
> >> > >> >>
> >> > >> >>
> >> > >> >> Krzysztof Podejma пишет:
> >> > >> >> > yes me too +1 general.properties with default fop font
> >> > >> >> >
> >> > >> >> >
> >> > >> >> > 2007/6/27, Jacques Le Roux <ja...@les7arts.com>:
> >> > >> >> >>
> >> > >> >> >> +1 for  general.properties
> >> > >> >> >>
> >> > >> >> >> Jacques
> >> > >> >> >>
> >> > >> >> >> De : "Krzysztof Podejma" <kp...@gmail.com>
> >> > >> >> >> > big thanks it works perfect.
> >> > >> >> >> > I think the pdf font should be parametrized somewhere in
> >> > >> properties
> >> > >> >> >> i.e
> >> > >> >> >> > general.properties
> >> > >> >> >> >
> >> > >> >> >> > I've found that there are used two different fonts: one
> >> when
> >> you
> >> > >> >> set
> >> > >> >> >> > font-family="" and another one when you dont't specify this
> >> > >> >> attribute.
> >> > >> >> >> > maybe the second one is set somewhere...
> >> > >> >> >> >
> >> > >> >> >> > Krzysztof Podejma
> >> > >> >> >> >
> >> > >> >> >> >
> >> > >> >> >> > 2007/6/27, Christian Geisert
> >> <ch...@isu-gmbh.de>:
> >> > >> >> >> > >
> >> > >> >> >> > > Krzysztof Podejma schrieb:
> >> > >> >> >> > > > Hello,
> >> > >> >> >> > > > I need polish characters in pdf files, so I have to set
> >> FOP
> >> > >> >> >> default
> >> > >> >> >> font
> >> > >> >> >> > > to
> >> > >> >> >> > > > Arial.
> >> > >> >> >> > > > I've configured fop.xconf to use Arial and generated
> >> font
> >> > >> >> files.
> >> > >> >> >> > > > It works well when I change font-family for blocks
> >> in fo
> >> > >> files
> >> > >> >> >> but I
> >> > >> >> >> > > don't
> >> > >> >> >> > > > want to modify all files.
> >> > >> >> >> > >
> >> > >> >> >> > > You can declare the font-family in the fo:root element
> >> which
> >> > >> >> >> means you
> >> > >> >> >> > > don't have to do it on every block, just once per
> >> document.
> >> > >> >> >> > >
> >> > >> >> >> > > > Do you happen to know how to do this?
> >> > >> >> >> > >
> >> > >> >> >> > > The default-value for the font-family property is
> >> 'sans-serif'
> >> > >> >> >> > > (Helvetica) which is hard coded in FOP.
> >> > >> >> >> > >
> >> > >> >> >> > > But if you work with FoDecorator/FoReportDecorator -
> >> which
> >> you
> >> > >> >> >> should
> >> > >> >> >> > > should do IMHO - you can declare it there and don't
> >> have to
> >> > >> worry
> >> > >> >> >> about
> >> > >> >> >> > > in every report.
> >> > >> >> >> > >
> >> > >> >> >> > > --
> >> > >> >> >> > > Christian
> >> > >> >> >> > >
> >> > >> >> >> > >
> >> > >> >> >> > >
> >> > >> >> >> >
> >> > >> >> >>
> >> > >> >> >
> >> > >> >>
> >> > >>
> >> >
> >>
> >>
>


Re: FOP default font

Posted by Oleg Andreyev <td...@mail.ru>.
Krzysztof,

Let me some examples. I have attached to this message three quotation 
generated with different locale (Russian, French and Italian).

Font is Arial(TTF) from Windows XP. Nothing else.
Is that meet your case?

Krzysztof Podejma пишет:
> Oleg,
> I'm thinking of a functionality that people from different countries 
> working
> together,could make reports and share these reports in one system, by 
> giving
> link or sth. if ofbiz can generate pdf's on fly, it is better to share 
> link
> to report than save pdf and send by email.
> ofbiz can translate labels in such reports, so why not to use it? i.e. if
> you generate report from sales with Russian locale and send me, I'll 
> not be
> able to understand it. With this functionality you could send me a 
> link to
> report and the report would be generated with polish locale and font,
> without any character breaks.
>
> Krzysztof Podejma
>
> 2007/6/28, Jacques Le Roux <ja...@les7arts.com>:
>>
>> +1 to move this interesting issue to dev ML
>>
>> Jacques
>>
>> De : "Oleg Andreyev" <td...@mail.ru>
>> > Hi Krzysztof,
>> >
>> > It's something wrong.
>> > To build multilanguage applications people invent UNICODE. To ensure
>> > unified look of a document anywhere Abobe was created Acrobat.
>> > Document created by FOP can be in any language (if used fonts have 
>> that
>> > language section of course). PDF in Polish with embed fonts remain
>> > readable anywhere.
>> >
>> > Current OfBiz reports have no instructions what fonts must be used. 
>> And
>> > it's bottom of the problem. Base-14 fonts must be available to 
>> every PDF
>> > reader but not any reader is localized. I think we have to select some
>> > widely used font (е.g Arial, TTF I think as low overhead), modify
>> > reports to use it, add in trunk all required  files.  In this case  we
>> > obtain  printing that will work OOTB anywhere (I hope:-).
>> >
>> > What about move this thread to dev ML?
>> >
>> > Krzysztof Podejma пишет:
>> > > thanks for the link I'll check it.
>> > >
>> > > I thought about font parameterizing for one greater purpose. 
>> Consider
>> > > multilingual system, now it is not possible to have reports in 
>> Chinese
>> ,
>> > > Russian, French etc. on one build(at once). If it would be 
>> possible to
>> > > associate font with locale and pass this font to reports, we 
>> would get
>> > > truly
>> > > multilingual system. No more broken encoding, automatic
>> document/report
>> > > translation and etc.
>> > > Of course this would require teplates(table size etc.) for fonts but
>> it
>> > > would work without it too.
>> > >
>> > > I have tested this and it works.
>> > >
>> > > placed
>> > > <#if (defaultFontFamily?exists)><#if (defaultFontFamily != "
>> > > pdf.default.fontfamily" && defaultFontFamily != "")>
>> > > font-family="${defaultFontFamily}" </#if></#if>
>> > > into <fo:page-sequence master-reference="main-page"> in
>> > > reportTemplate.fo.ftl
>> > >
>> > > <property-to-field field="defaultFontFamily" resource="general"
>> > > property="
>> > > pdf.default.fontfamily" default=""/>
>> > > into actions in FoReportDecorator
>> > >
>> > > pdf.default.fontfamily=Arial
>> > > into general.properties
>> > >
>> > > maybe it is not elegant but it works, test it with your font if you
>> like.
>> > >
>> > > Krzysztof Podejma
>> > >
>> > > 2007/6/28, Oleg Andreyev <td...@mail.ru>:
>> > >>
>> > >>
>> > >>
>> > >> Krzysztof Podejma пишет:
>> > >> > in trunk - current distribution default value would stay as it is
>> now,
>> > >> > and
>> > >> > nobody will change it to font that use metrics that aren't in
>> trunk.
>> > >> > I think it is good idea to change default font in one place 
>> instead
>> of
>> > >> > modifying all reports each.
>> > >> IMHO, for custom solutions replace works faster:) But you are right
>> on
>> > >> the whole.
>> > >> >
>> > >> > if you want to have more than one font in your pdf you can always
>> > >> > override a
>> > >> > font-family for block or for entire document.
>> > >> > this property would have ability to not take effect if not set
>> > >> >
>> > >> > Nobody wants to crash anything, we want to have less work because
>> > >> we use
>> > >> > non-English characters and it is a pain to track all new pdf's 
>> and
>> > >> > check if
>> > >> > they print correctly.
>> > >> >
>> > >> > +1 fop.xconf
>> > >> > AFAIK fop.xconf is necessary for custom fonts but you cannot set
>> > >> default
>> > >> > font in fop.xconf, correct me if I'm wrong
>> > >> http://xmlgraphics.apache.org/fop/0.93/fonts.html
>> > >> Pay attention to last topic. Theoretically if you have font 
>> Helvetica
>> > >> you can embed it as any other.
>> > >>
>> > >>
>> > >> > We need this property because we have fop.xconf and font metrics
>> > >> > installed
>> > >> > and we don't want to modify and/or merge all pdf files.
>> > >> >
>> > >> > Krzysztof Podejma
>> > >> >
>> > >> > 2007/6/27, Oleg Andreyev <td...@mail.ru>:
>> > >> >>
>> > >> >> -1
>> > >> >> There are no universal solutions in this field.
>> > >> >> What's happened if somebody will add Arial(or Tahoma, or 
>> something
>> > >> else)
>> > >> >> as value this property in current distribution?
>> > >> >> Nothing. Just another error message in log.
>> > >> >> I have the same problems with Cyrillic fonts but apart from
>> > >> accessible
>> > >> >> programmatically default font name we need right fop.xconf,
>> > >> metrics and
>> > >> >> fonts itself installed in the system. Such property may be 
>> useful
>> > >> only
>> > >> >> if you well understand the rest configuration tasks. This is a
>> > >> point of
>> > >> >> mistake.
>> > >> >>
>> > >> >> As remark. I'd like to see standard fop.xconf in the trunk. One
>> from
>> > >> FOP
>> > >> >> distribution just well commented and can be used as guide by new
>> > >> users
>> > >> >> and developers.
>> > >> >> https://issues.apache.org/jira/browse/OFBIZ-990
>> > >> >>
>> > >> >> If fop.xconf will in trunk, it would be rightly move page
>> > >> height/width
>> > >> >> to config as part of the localization process. Now these 
>> hardcoded
>> > >> tags
>> > >> >> define Letter, not widely used paper format outside US.
>> > >> >>
>> > >> >>
>> > >> >> Krzysztof Podejma пишет:
>> > >> >> > yes me too +1 general.properties with default fop font
>> > >> >> >
>> > >> >> >
>> > >> >> > 2007/6/27, Jacques Le Roux <ja...@les7arts.com>:
>> > >> >> >>
>> > >> >> >> +1 for  general.properties
>> > >> >> >>
>> > >> >> >> Jacques
>> > >> >> >>
>> > >> >> >> De : "Krzysztof Podejma" <kp...@gmail.com>
>> > >> >> >> > big thanks it works perfect.
>> > >> >> >> > I think the pdf font should be parametrized somewhere in
>> > >> properties
>> > >> >> >> i.e
>> > >> >> >> > general.properties
>> > >> >> >> >
>> > >> >> >> > I've found that there are used two different fonts: one 
>> when
>> you
>> > >> >> set
>> > >> >> >> > font-family="" and another one when you dont't specify this
>> > >> >> attribute.
>> > >> >> >> > maybe the second one is set somewhere...
>> > >> >> >> >
>> > >> >> >> > Krzysztof Podejma
>> > >> >> >> >
>> > >> >> >> >
>> > >> >> >> > 2007/6/27, Christian Geisert 
>> <ch...@isu-gmbh.de>:
>> > >> >> >> > >
>> > >> >> >> > > Krzysztof Podejma schrieb:
>> > >> >> >> > > > Hello,
>> > >> >> >> > > > I need polish characters in pdf files, so I have to set
>> FOP
>> > >> >> >> default
>> > >> >> >> font
>> > >> >> >> > > to
>> > >> >> >> > > > Arial.
>> > >> >> >> > > > I've configured fop.xconf to use Arial and generated 
>> font
>> > >> >> files.
>> > >> >> >> > > > It works well when I change font-family for blocks 
>> in fo
>> > >> files
>> > >> >> >> but I
>> > >> >> >> > > don't
>> > >> >> >> > > > want to modify all files.
>> > >> >> >> > >
>> > >> >> >> > > You can declare the font-family in the fo:root element
>> which
>> > >> >> >> means you
>> > >> >> >> > > don't have to do it on every block, just once per 
>> document.
>> > >> >> >> > >
>> > >> >> >> > > > Do you happen to know how to do this?
>> > >> >> >> > >
>> > >> >> >> > > The default-value for the font-family property is
>> 'sans-serif'
>> > >> >> >> > > (Helvetica) which is hard coded in FOP.
>> > >> >> >> > >
>> > >> >> >> > > But if you work with FoDecorator/FoReportDecorator - 
>> which
>> you
>> > >> >> >> should
>> > >> >> >> > > should do IMHO - you can declare it there and don't 
>> have to
>> > >> worry
>> > >> >> >> about
>> > >> >> >> > > in every report.
>> > >> >> >> > >
>> > >> >> >> > > --
>> > >> >> >> > > Christian
>> > >> >> >> > >
>> > >> >> >> > >
>> > >> >> >> > >
>> > >> >> >> >
>> > >> >> >>
>> > >> >> >
>> > >> >>
>> > >>
>> >
>>
>>

Re: FOP default font

Posted by Chris Howe <cj...@yahoo.com>.
Just to interject a potential complication (and potential solution)
with this scenario.  When a pdf file is emailed, it becomes a static
document (the data will always be the same, today, tomorrow, next
year).  When it is a link, it remains dynamic.  In some instances you
want the data to remain dynamic and in some instances you want it to be
static.  

To maintain a static document and use the approach that you are
suggesting, the data that exists when the document would have been
created needs to be stored somewhere.  You likely will need to create a
data document and store on the server so that the report can then be
generated in the various languages on the fly.  XML is likely a better
storage mechanism for most reports than is a RDBMS.  If you're using
XML, an XML database is likely to be more beneficial than simple xml
file storage.  And, there is already a basic implementation of an XML
database in Jira (Xindice).  
FWIW,
Chris


--- Krzysztof Podejma <kp...@gmail.com> wrote:

> Oleg,
> I'm thinking of a functionality that people from different countries
> working
> together,could make reports and share these reports in one system, by
> giving
> link or sth. if ofbiz can generate pdf's on fly, it is better to
> share link
> to report than save pdf and send by email.
> ofbiz can translate labels in such reports, so why not to use it?
> i.e. if
> you generate report from sales with Russian locale and send me, I'll
> not be
> able to understand it. With this functionality you could send me a
> link to
> report and the report would be generated with polish locale and font,
> without any character breaks.
> 
> Krzysztof Podejma
> 
> 2007/6/28, Jacques Le Roux <ja...@les7arts.com>:
> >
> > +1 to move this interesting issue to dev ML
> >
> > Jacques
> >
> > De : "Oleg Andreyev" <td...@mail.ru>
> > > Hi Krzysztof,
> > >
> > > It's something wrong.
> > > To build multilanguage applications people invent UNICODE. To
> ensure
> > > unified look of a document anywhere Abobe was created Acrobat.
> > > Document created by FOP can be in any language (if used fonts
> have that
> > > language section of course). PDF in Polish with embed fonts
> remain
> > > readable anywhere.
> > >
> > > Current OfBiz reports have no instructions what fonts must be
> used. And
> > > it's bottom of the problem. Base-14 fonts must be available to
> every PDF
> > > reader but not any reader is localized. I think we have to select
> some
> > > widely used font (Å.g Arial, TTF I think as low overhead), modify
> > > reports to use it, add in trunk all required  files.  In this
> case  we
> > > obtain  printing that will work OOTB anywhere (I hope:-).
> > >
> > > What about move this thread to dev ML?
> > >
> > > Krzysztof Podejma ÐÉÛÅÔ:
> > > > thanks for the link I'll check it.
> > > >
> > > > I thought about font parameterizing for one greater purpose.
> Consider
> > > > multilingual system, now it is not possible to have reports in
> Chinese
> > ,
> > > > Russian, French etc. on one build(at once). If it would be
> possible to
> > > > associate font with locale and pass this font to reports, we
> would get
> > > > truly
> > > > multilingual system. No more broken encoding, automatic
> > document/report
> > > > translation and etc.
> > > > Of course this would require teplates(table size etc.) for
> fonts but
> > it
> > > > would work without it too.
> > > >
> > > > I have tested this and it works.
> > > >
> > > > placed
> > > > <#if (defaultFontFamily?exists)><#if (defaultFontFamily != "
> > > > pdf.default.fontfamily" && defaultFontFamily != "")>
> > > > font-family="${defaultFontFamily}" </#if></#if>
> > > > into <fo:page-sequence master-reference="main-page"> in
> > > > reportTemplate.fo.ftl
> > > >
> > > > <property-to-field field="defaultFontFamily" resource="general"
> > > > property="
> > > > pdf.default.fontfamily" default=""/>
> > > > into actions in FoReportDecorator
> > > >
> > > > pdf.default.fontfamily=Arial
> > > > into general.properties
> > > >
> > > > maybe it is not elegant but it works, test it with your font if
> you
> > like.
> > > >
> > > > Krzysztof Podejma
> > > >
> > > > 2007/6/28, Oleg Andreyev <td...@mail.ru>:
> > > >>
> > > >>
> > > >>
> > > >> Krzysztof Podejma ÐÉÛÅÔ:
> > > >> > in trunk - current distribution default value would stay as
> it is
> > now,
> > > >> > and
> > > >> > nobody will change it to font that use metrics that aren't
> in
> > trunk.
> > > >> > I think it is good idea to change default font in one place
> instead
> > of
> > > >> > modifying all reports each.
> > > >> IMHO, for custom solutions replace works faster:) But you are
> right
> > on
> > > >> the whole.
> > > >> >
> > > >> > if you want to have more than one font in your pdf you can
> always
> > > >> > override a
> > > >> > font-family for block or for entire document.
> > > >> > this property would have ability to not take effect if not
> set
> > > >> >
> > > >> > Nobody wants to crash anything, we want to have less work
> because
> > > >> we use
> > > >> > non-English characters and it is a pain to track all new
> pdf's and
> > > >> > check if
> > > >> > they print correctly.
> > > >> >
> > > >> > +1 fop.xconf
> > > >> > AFAIK fop.xconf is necessary for custom fonts but you cannot
> set
> > > >> default
> > > >> > font in fop.xconf, correct me if I'm wrong
> > > >> http://xmlgraphics.apache.org/fop/0.93/fonts.html
> > > >> Pay attention to last topic. Theoretically if you have font
> Helvetica
> > > >> you can embed it as any other.
> > > >>
> > > >>
> > > >> > We need this property because we have fop.xconf and font
> metrics
> > > >> > installed
> > > >> > and we don't want to modify and/or merge all pdf files.
> > > >> >
> > > >> > Krzysztof Podejma
> > > >> >
> > > >> > 2007/6/27, Oleg Andreyev <td...@mail.ru>:
> > > >> >>
> > > >> >> -1
> > > >> >> There are no universal solutions in this field.
> > > >> >> What's happened if somebody will add Arial(or Tahoma, or
> something
> > > >> else)
> > > >> >> as value this property in current distribution?
> > > >> >> Nothing. Just another error message in log.
> > > >> >> I have the same problems with Cyrillic fonts but apart from
> > > >> accessible
> > > >> >> programmatically default font name we need right fop.xconf,
> > > >> metrics and
> > > >> >> fonts itself installed in the system. Such property may be
> useful
> > > >> only
> > > >> >> if you well understand the rest configuration tasks. This
> is a
> > > >> point of
> > > >> >> mistake.
> > > >> >>
> > > >> >> As remark. I'd like to see standard fop.xconf in the trunk.
> One
> > from
> > > >> FOP
> > > >> >> distribution just well commented and can be used as guide
> by new
> > > >> users
> > > >> >> and developers.
> > > >> >> https://issues.apache.org/jira/browse/OFBIZ-990
> > > >> >>
> > > >> >> If fop.xconf will in trunk, it would be rightly move page
> > > >> height/width
> > > >> >> to config as part of the localization process. Now these
> hardcoded
> > > >> tags
> > > >> >> define Letter, not widely used paper format outside US.
> > > >> >>
> > > >> >>
> > > >> >> Krzysztof Podejma ÐÉÛÅÔ:
> > > >> >> > yes me too +1 general.properties with default fop font
> > > >> >> >
> > > >> >> >
> > > >> >> > 2007/6/27, Jacques Le Roux
> <ja...@les7arts.com>:
> > > >> >> >>
> > > >> >> >> +1 for  general.properties
> > > >> >> >>
> > > >> >> >> Jacques
> > > >> >> >>
> > > >> >> >> De : "Krzysztof Podejma" <kp...@gmail.com>
> > > >> >> >> > big thanks it works perfect.
> 
=== message truncated ===


Re: FOP default font

Posted by Krzysztof Podejma <kp...@gmail.com>.
Oleg,
I'm thinking of a functionality that people from different countries working
together,could make reports and share these reports in one system, by giving
link or sth. if ofbiz can generate pdf's on fly, it is better to share link
to report than save pdf and send by email.
ofbiz can translate labels in such reports, so why not to use it? i.e. if
you generate report from sales with Russian locale and send me, I'll not be
able to understand it. With this functionality you could send me a link to
report and the report would be generated with polish locale and font,
without any character breaks.

Krzysztof Podejma

2007/6/28, Jacques Le Roux <ja...@les7arts.com>:
>
> +1 to move this interesting issue to dev ML
>
> Jacques
>
> De : "Oleg Andreyev" <td...@mail.ru>
> > Hi Krzysztof,
> >
> > It's something wrong.
> > To build multilanguage applications people invent UNICODE. To ensure
> > unified look of a document anywhere Abobe was created Acrobat.
> > Document created by FOP can be in any language (if used fonts have that
> > language section of course). PDF in Polish with embed fonts remain
> > readable anywhere.
> >
> > Current OfBiz reports have no instructions what fonts must be used. And
> > it's bottom of the problem. Base-14 fonts must be available to every PDF
> > reader but not any reader is localized. I think we have to select some
> > widely used font (е.g Arial, TTF I think as low overhead), modify
> > reports to use it, add in trunk all required  files.  In this case  we
> > obtain  printing that will work OOTB anywhere (I hope:-).
> >
> > What about move this thread to dev ML?
> >
> > Krzysztof Podejma пишет:
> > > thanks for the link I'll check it.
> > >
> > > I thought about font parameterizing for one greater purpose. Consider
> > > multilingual system, now it is not possible to have reports in Chinese
> ,
> > > Russian, French etc. on one build(at once). If it would be possible to
> > > associate font with locale and pass this font to reports, we would get
> > > truly
> > > multilingual system. No more broken encoding, automatic
> document/report
> > > translation and etc.
> > > Of course this would require teplates(table size etc.) for fonts but
> it
> > > would work without it too.
> > >
> > > I have tested this and it works.
> > >
> > > placed
> > > <#if (defaultFontFamily?exists)><#if (defaultFontFamily != "
> > > pdf.default.fontfamily" && defaultFontFamily != "")>
> > > font-family="${defaultFontFamily}" </#if></#if>
> > > into <fo:page-sequence master-reference="main-page"> in
> > > reportTemplate.fo.ftl
> > >
> > > <property-to-field field="defaultFontFamily" resource="general"
> > > property="
> > > pdf.default.fontfamily" default=""/>
> > > into actions in FoReportDecorator
> > >
> > > pdf.default.fontfamily=Arial
> > > into general.properties
> > >
> > > maybe it is not elegant but it works, test it with your font if you
> like.
> > >
> > > Krzysztof Podejma
> > >
> > > 2007/6/28, Oleg Andreyev <td...@mail.ru>:
> > >>
> > >>
> > >>
> > >> Krzysztof Podejma пишет:
> > >> > in trunk - current distribution default value would stay as it is
> now,
> > >> > and
> > >> > nobody will change it to font that use metrics that aren't in
> trunk.
> > >> > I think it is good idea to change default font in one place instead
> of
> > >> > modifying all reports each.
> > >> IMHO, for custom solutions replace works faster:) But you are right
> on
> > >> the whole.
> > >> >
> > >> > if you want to have more than one font in your pdf you can always
> > >> > override a
> > >> > font-family for block or for entire document.
> > >> > this property would have ability to not take effect if not set
> > >> >
> > >> > Nobody wants to crash anything, we want to have less work because
> > >> we use
> > >> > non-English characters and it is a pain to track all new pdf's and
> > >> > check if
> > >> > they print correctly.
> > >> >
> > >> > +1 fop.xconf
> > >> > AFAIK fop.xconf is necessary for custom fonts but you cannot set
> > >> default
> > >> > font in fop.xconf, correct me if I'm wrong
> > >> http://xmlgraphics.apache.org/fop/0.93/fonts.html
> > >> Pay attention to last topic. Theoretically if you have font Helvetica
> > >> you can embed it as any other.
> > >>
> > >>
> > >> > We need this property because we have fop.xconf and font metrics
> > >> > installed
> > >> > and we don't want to modify and/or merge all pdf files.
> > >> >
> > >> > Krzysztof Podejma
> > >> >
> > >> > 2007/6/27, Oleg Andreyev <td...@mail.ru>:
> > >> >>
> > >> >> -1
> > >> >> There are no universal solutions in this field.
> > >> >> What's happened if somebody will add Arial(or Tahoma, or something
> > >> else)
> > >> >> as value this property in current distribution?
> > >> >> Nothing. Just another error message in log.
> > >> >> I have the same problems with Cyrillic fonts but apart from
> > >> accessible
> > >> >> programmatically default font name we need right fop.xconf,
> > >> metrics and
> > >> >> fonts itself installed in the system. Such property may be useful
> > >> only
> > >> >> if you well understand the rest configuration tasks. This is a
> > >> point of
> > >> >> mistake.
> > >> >>
> > >> >> As remark. I'd like to see standard fop.xconf in the trunk. One
> from
> > >> FOP
> > >> >> distribution just well commented and can be used as guide by new
> > >> users
> > >> >> and developers.
> > >> >> https://issues.apache.org/jira/browse/OFBIZ-990
> > >> >>
> > >> >> If fop.xconf will in trunk, it would be rightly move page
> > >> height/width
> > >> >> to config as part of the localization process. Now these hardcoded
> > >> tags
> > >> >> define Letter, not widely used paper format outside US.
> > >> >>
> > >> >>
> > >> >> Krzysztof Podejma пишет:
> > >> >> > yes me too +1 general.properties with default fop font
> > >> >> >
> > >> >> >
> > >> >> > 2007/6/27, Jacques Le Roux <ja...@les7arts.com>:
> > >> >> >>
> > >> >> >> +1 for  general.properties
> > >> >> >>
> > >> >> >> Jacques
> > >> >> >>
> > >> >> >> De : "Krzysztof Podejma" <kp...@gmail.com>
> > >> >> >> > big thanks it works perfect.
> > >> >> >> > I think the pdf font should be parametrized somewhere in
> > >> properties
> > >> >> >> i.e
> > >> >> >> > general.properties
> > >> >> >> >
> > >> >> >> > I've found that there are used two different fonts: one when
> you
> > >> >> set
> > >> >> >> > font-family="" and another one when you dont't specify this
> > >> >> attribute.
> > >> >> >> > maybe the second one is set somewhere...
> > >> >> >> >
> > >> >> >> > Krzysztof Podejma
> > >> >> >> >
> > >> >> >> >
> > >> >> >> > 2007/6/27, Christian Geisert <ch...@isu-gmbh.de>:
> > >> >> >> > >
> > >> >> >> > > Krzysztof Podejma schrieb:
> > >> >> >> > > > Hello,
> > >> >> >> > > > I need polish characters in pdf files, so I have to set
> FOP
> > >> >> >> default
> > >> >> >> font
> > >> >> >> > > to
> > >> >> >> > > > Arial.
> > >> >> >> > > > I've configured fop.xconf to use Arial and generated font
> > >> >> files.
> > >> >> >> > > > It works well when I change font-family for blocks in fo
> > >> files
> > >> >> >> but I
> > >> >> >> > > don't
> > >> >> >> > > > want to modify all files.
> > >> >> >> > >
> > >> >> >> > > You can declare the font-family in the fo:root element
> which
> > >> >> >> means you
> > >> >> >> > > don't have to do it on every block, just once per document.
> > >> >> >> > >
> > >> >> >> > > > Do you happen to know how to do this?
> > >> >> >> > >
> > >> >> >> > > The default-value for the font-family property is
> 'sans-serif'
> > >> >> >> > > (Helvetica) which is hard coded in FOP.
> > >> >> >> > >
> > >> >> >> > > But if you work with FoDecorator/FoReportDecorator - which
> you
> > >> >> >> should
> > >> >> >> > > should do IMHO - you can declare it there and don't have to
> > >> worry
> > >> >> >> about
> > >> >> >> > > in every report.
> > >> >> >> > >
> > >> >> >> > > --
> > >> >> >> > > Christian
> > >> >> >> > >
> > >> >> >> > >
> > >> >> >> > >
> > >> >> >> >
> > >> >> >>
> > >> >> >
> > >> >>
> > >>
> >
>
>

Re: FOP default font

Posted by Jacques Le Roux <ja...@les7arts.com>.
+1 to move this interesting issue to dev ML

Jacques

De : "Oleg Andreyev" <td...@mail.ru>
> Hi Krzysztof,
>
> It's something wrong.
> To build multilanguage applications people invent UNICODE. To ensure
> unified look of a document anywhere Abobe was created Acrobat.
> Document created by FOP can be in any language (if used fonts have that
> language section of course). PDF in Polish with embed fonts remain
> readable anywhere.
>
> Current OfBiz reports have no instructions what fonts must be used. And
> it's bottom of the problem. Base-14 fonts must be available to every PDF
> reader but not any reader is localized. I think we have to select some
> widely used font (е.g Arial, TTF I think as low overhead), modify
> reports to use it, add in trunk all required  files.  In this case  we
> obtain  printing that will work OOTB anywhere (I hope:-).
>
> What about move this thread to dev ML?
>
> Krzysztof Podejma пишет:
> > thanks for the link I'll check it.
> >
> > I thought about font parameterizing for one greater purpose. Consider
> > multilingual system, now it is not possible to have reports in Chinese ,
> > Russian, French etc. on one build(at once). If it would be possible to
> > associate font with locale and pass this font to reports, we would get
> > truly
> > multilingual system. No more broken encoding, automatic document/report
> > translation and etc.
> > Of course this would require teplates(table size etc.) for fonts but it
> > would work without it too.
> >
> > I have tested this and it works.
> >
> > placed
> > <#if (defaultFontFamily?exists)><#if (defaultFontFamily != "
> > pdf.default.fontfamily" && defaultFontFamily != "")>
> > font-family="${defaultFontFamily}" </#if></#if>
> > into <fo:page-sequence master-reference="main-page"> in
> > reportTemplate.fo.ftl
> >
> > <property-to-field field="defaultFontFamily" resource="general"
> > property="
> > pdf.default.fontfamily" default=""/>
> > into actions in FoReportDecorator
> >
> > pdf.default.fontfamily=Arial
> > into general.properties
> >
> > maybe it is not elegant but it works, test it with your font if you like.
> >
> > Krzysztof Podejma
> >
> > 2007/6/28, Oleg Andreyev <td...@mail.ru>:
> >>
> >>
> >>
> >> Krzysztof Podejma пишет:
> >> > in trunk - current distribution default value would stay as it is now,
> >> > and
> >> > nobody will change it to font that use metrics that aren't in trunk.
> >> > I think it is good idea to change default font in one place instead of
> >> > modifying all reports each.
> >> IMHO, for custom solutions replace works faster:) But you are right on
> >> the whole.
> >> >
> >> > if you want to have more than one font in your pdf you can always
> >> > override a
> >> > font-family for block or for entire document.
> >> > this property would have ability to not take effect if not set
> >> >
> >> > Nobody wants to crash anything, we want to have less work because
> >> we use
> >> > non-English characters and it is a pain to track all new pdf's and
> >> > check if
> >> > they print correctly.
> >> >
> >> > +1 fop.xconf
> >> > AFAIK fop.xconf is necessary for custom fonts but you cannot set
> >> default
> >> > font in fop.xconf, correct me if I'm wrong
> >> http://xmlgraphics.apache.org/fop/0.93/fonts.html
> >> Pay attention to last topic. Theoretically if you have font Helvetica
> >> you can embed it as any other.
> >>
> >>
> >> > We need this property because we have fop.xconf and font metrics
> >> > installed
> >> > and we don't want to modify and/or merge all pdf files.
> >> >
> >> > Krzysztof Podejma
> >> >
> >> > 2007/6/27, Oleg Andreyev <td...@mail.ru>:
> >> >>
> >> >> -1
> >> >> There are no universal solutions in this field.
> >> >> What's happened if somebody will add Arial(or Tahoma, or something
> >> else)
> >> >> as value this property in current distribution?
> >> >> Nothing. Just another error message in log.
> >> >> I have the same problems with Cyrillic fonts but apart from
> >> accessible
> >> >> programmatically default font name we need right fop.xconf,
> >> metrics and
> >> >> fonts itself installed in the system. Such property may be useful
> >> only
> >> >> if you well understand the rest configuration tasks. This is a
> >> point of
> >> >> mistake.
> >> >>
> >> >> As remark. I'd like to see standard fop.xconf in the trunk. One from
> >> FOP
> >> >> distribution just well commented and can be used as guide by new
> >> users
> >> >> and developers.
> >> >> https://issues.apache.org/jira/browse/OFBIZ-990
> >> >>
> >> >> If fop.xconf will in trunk, it would be rightly move page
> >> height/width
> >> >> to config as part of the localization process. Now these hardcoded
> >> tags
> >> >> define Letter, not widely used paper format outside US.
> >> >>
> >> >>
> >> >> Krzysztof Podejma пишет:
> >> >> > yes me too +1 general.properties with default fop font
> >> >> >
> >> >> >
> >> >> > 2007/6/27, Jacques Le Roux <ja...@les7arts.com>:
> >> >> >>
> >> >> >> +1 for  general.properties
> >> >> >>
> >> >> >> Jacques
> >> >> >>
> >> >> >> De : "Krzysztof Podejma" <kp...@gmail.com>
> >> >> >> > big thanks it works perfect.
> >> >> >> > I think the pdf font should be parametrized somewhere in
> >> properties
> >> >> >> i.e
> >> >> >> > general.properties
> >> >> >> >
> >> >> >> > I've found that there are used two different fonts: one when you
> >> >> set
> >> >> >> > font-family="" and another one when you dont't specify this
> >> >> attribute.
> >> >> >> > maybe the second one is set somewhere...
> >> >> >> >
> >> >> >> > Krzysztof Podejma
> >> >> >> >
> >> >> >> >
> >> >> >> > 2007/6/27, Christian Geisert <ch...@isu-gmbh.de>:
> >> >> >> > >
> >> >> >> > > Krzysztof Podejma schrieb:
> >> >> >> > > > Hello,
> >> >> >> > > > I need polish characters in pdf files, so I have to set FOP
> >> >> >> default
> >> >> >> font
> >> >> >> > > to
> >> >> >> > > > Arial.
> >> >> >> > > > I've configured fop.xconf to use Arial and generated font
> >> >> files.
> >> >> >> > > > It works well when I change font-family for blocks in fo
> >> files
> >> >> >> but I
> >> >> >> > > don't
> >> >> >> > > > want to modify all files.
> >> >> >> > >
> >> >> >> > > You can declare the font-family in the fo:root element which
> >> >> >> means you
> >> >> >> > > don't have to do it on every block, just once per document.
> >> >> >> > >
> >> >> >> > > > Do you happen to know how to do this?
> >> >> >> > >
> >> >> >> > > The default-value for the font-family property is 'sans-serif'
> >> >> >> > > (Helvetica) which is hard coded in FOP.
> >> >> >> > >
> >> >> >> > > But if you work with FoDecorator/FoReportDecorator - which you
> >> >> >> should
> >> >> >> > > should do IMHO - you can declare it there and don't have to
> >> worry
> >> >> >> about
> >> >> >> > > in every report.
> >> >> >> > >
> >> >> >> > > --
> >> >> >> > > Christian
> >> >> >> > >
> >> >> >> > >
> >> >> >> > >
> >> >> >> >
> >> >> >>
> >> >> >
> >> >>
> >>
>


Re: FOP default font

Posted by Oleg Andreyev <td...@mail.ru>.
Hi Krzysztof,

It's something wrong.
To build multilanguage applications people invent UNICODE. To ensure 
unified look of a document anywhere Abobe was created Acrobat.
Document created by FOP can be in any language (if used fonts have that 
language section of course). PDF in Polish with embed fonts remain 
readable anywhere.

Current OfBiz reports have no instructions what fonts must be used. And 
it's bottom of the problem. Base-14 fonts must be available to every PDF 
reader but not any reader is localized. I think we have to select some 
widely used font (е.g Arial, TTF I think as low overhead), modify 
reports to use it, add in trunk all required  files.  In this case  we 
obtain  printing that will work OOTB anywhere (I hope:-).

What about move this thread to dev ML?

Krzysztof Podejma пишет:
> thanks for the link I'll check it.
>
> I thought about font parameterizing for one greater purpose. Consider
> multilingual system, now it is not possible to have reports in Chinese ,
> Russian, French etc. on one build(at once). If it would be possible to
> associate font with locale and pass this font to reports, we would get 
> truly
> multilingual system. No more broken encoding, automatic document/report
> translation and etc.
> Of course this would require teplates(table size etc.) for fonts but it
> would work without it too.
>
> I have tested this and it works.
>
> placed
> <#if (defaultFontFamily?exists)><#if (defaultFontFamily != "
> pdf.default.fontfamily" && defaultFontFamily != "")>
> font-family="${defaultFontFamily}" </#if></#if>
> into <fo:page-sequence master-reference="main-page"> in
> reportTemplate.fo.ftl
>
> <property-to-field field="defaultFontFamily" resource="general" 
> property="
> pdf.default.fontfamily" default=""/>
> into actions in FoReportDecorator
>
> pdf.default.fontfamily=Arial
> into general.properties
>
> maybe it is not elegant but it works, test it with your font if you like.
>
> Krzysztof Podejma
>
> 2007/6/28, Oleg Andreyev <td...@mail.ru>:
>>
>>
>>
>> Krzysztof Podejma пишет:
>> > in trunk - current distribution default value would stay as it is now,
>> > and
>> > nobody will change it to font that use metrics that aren't in trunk.
>> > I think it is good idea to change default font in one place instead of
>> > modifying all reports each.
>> IMHO, for custom solutions replace works faster:) But you are right on
>> the whole.
>> >
>> > if you want to have more than one font in your pdf you can always
>> > override a
>> > font-family for block or for entire document.
>> > this property would have ability to not take effect if not set
>> >
>> > Nobody wants to crash anything, we want to have less work because 
>> we use
>> > non-English characters and it is a pain to track all new pdf's and
>> > check if
>> > they print correctly.
>> >
>> > +1 fop.xconf
>> > AFAIK fop.xconf is necessary for custom fonts but you cannot set 
>> default
>> > font in fop.xconf, correct me if I'm wrong
>> http://xmlgraphics.apache.org/fop/0.93/fonts.html
>> Pay attention to last topic. Theoretically if you have font Helvetica
>> you can embed it as any other.
>>
>>
>> > We need this property because we have fop.xconf and font metrics
>> > installed
>> > and we don't want to modify and/or merge all pdf files.
>> >
>> > Krzysztof Podejma
>> >
>> > 2007/6/27, Oleg Andreyev <td...@mail.ru>:
>> >>
>> >> -1
>> >> There are no universal solutions in this field.
>> >> What's happened if somebody will add Arial(or Tahoma, or something
>> else)
>> >> as value this property in current distribution?
>> >> Nothing. Just another error message in log.
>> >> I have the same problems with Cyrillic fonts but apart from 
>> accessible
>> >> programmatically default font name we need right fop.xconf, 
>> metrics and
>> >> fonts itself installed in the system. Such property may be useful 
>> only
>> >> if you well understand the rest configuration tasks. This is a 
>> point of
>> >> mistake.
>> >>
>> >> As remark. I'd like to see standard fop.xconf in the trunk. One from
>> FOP
>> >> distribution just well commented and can be used as guide by new 
>> users
>> >> and developers.
>> >> https://issues.apache.org/jira/browse/OFBIZ-990
>> >>
>> >> If fop.xconf will in trunk, it would be rightly move page 
>> height/width
>> >> to config as part of the localization process. Now these hardcoded 
>> tags
>> >> define Letter, not widely used paper format outside US.
>> >>
>> >>
>> >> Krzysztof Podejma пишет:
>> >> > yes me too +1 general.properties with default fop font
>> >> >
>> >> >
>> >> > 2007/6/27, Jacques Le Roux <ja...@les7arts.com>:
>> >> >>
>> >> >> +1 for  general.properties
>> >> >>
>> >> >> Jacques
>> >> >>
>> >> >> De : "Krzysztof Podejma" <kp...@gmail.com>
>> >> >> > big thanks it works perfect.
>> >> >> > I think the pdf font should be parametrized somewhere in
>> properties
>> >> >> i.e
>> >> >> > general.properties
>> >> >> >
>> >> >> > I've found that there are used two different fonts: one when you
>> >> set
>> >> >> > font-family="" and another one when you dont't specify this
>> >> attribute.
>> >> >> > maybe the second one is set somewhere...
>> >> >> >
>> >> >> > Krzysztof Podejma
>> >> >> >
>> >> >> >
>> >> >> > 2007/6/27, Christian Geisert <ch...@isu-gmbh.de>:
>> >> >> > >
>> >> >> > > Krzysztof Podejma schrieb:
>> >> >> > > > Hello,
>> >> >> > > > I need polish characters in pdf files, so I have to set FOP
>> >> >> default
>> >> >> font
>> >> >> > > to
>> >> >> > > > Arial.
>> >> >> > > > I've configured fop.xconf to use Arial and generated font
>> >> files.
>> >> >> > > > It works well when I change font-family for blocks in fo 
>> files
>> >> >> but I
>> >> >> > > don't
>> >> >> > > > want to modify all files.
>> >> >> > >
>> >> >> > > You can declare the font-family in the fo:root element which
>> >> >> means you
>> >> >> > > don't have to do it on every block, just once per document.
>> >> >> > >
>> >> >> > > > Do you happen to know how to do this?
>> >> >> > >
>> >> >> > > The default-value for the font-family property is 'sans-serif'
>> >> >> > > (Helvetica) which is hard coded in FOP.
>> >> >> > >
>> >> >> > > But if you work with FoDecorator/FoReportDecorator - which you
>> >> >> should
>> >> >> > > should do IMHO - you can declare it there and don't have to
>> worry
>> >> >> about
>> >> >> > > in every report.
>> >> >> > >
>> >> >> > > --
>> >> >> > > Christian
>> >> >> > >
>> >> >> > >
>> >> >> > >
>> >> >> >
>> >> >>
>> >> >
>> >>
>>

Re: FOP default font

Posted by Krzysztof Podejma <kp...@gmail.com>.
thanks for the link I'll check it.

I thought about font parameterizing for one greater purpose. Consider
multilingual system, now it is not possible to have reports in Chinese ,
Russian, French etc. on one build(at once). If it would be possible to
associate font with locale and pass this font to reports, we would get truly
multilingual system. No more broken encoding, automatic document/report
translation and etc.
Of course this would require teplates(table size etc.) for fonts but it
would work without it too.

I have tested this and it works.

placed
 <#if (defaultFontFamily?exists)><#if (defaultFontFamily != "
pdf.default.fontfamily" && defaultFontFamily != "")>
font-family="${defaultFontFamily}" </#if></#if>
into <fo:page-sequence master-reference="main-page"> in
reportTemplate.fo.ftl

<property-to-field field="defaultFontFamily" resource="general" property="
pdf.default.fontfamily" default=""/>
into actions in FoReportDecorator

pdf.default.fontfamily=Arial
into general.properties

maybe it is not elegant but it works, test it with your font if you like.

Krzysztof Podejma

2007/6/28, Oleg Andreyev <td...@mail.ru>:
>
>
>
> Krzysztof Podejma пишет:
> > in trunk - current distribution default value would stay as it is now,
> > and
> > nobody will change it to font that use metrics that aren't in trunk.
> > I think it is good idea to change default font in one place instead of
> > modifying all reports each.
> IMHO, for custom solutions replace works faster:) But you are right on
> the whole.
> >
> > if you want to have more than one font in your pdf you can always
> > override a
> > font-family for block or for entire document.
> > this property would have ability to not take effect if not set
> >
> > Nobody wants to crash anything, we want to have less work because we use
> > non-English characters and it is a pain to track all new pdf's and
> > check if
> > they print correctly.
> >
> > +1 fop.xconf
> > AFAIK fop.xconf is necessary for custom fonts but you cannot set default
> > font in fop.xconf, correct me if I'm wrong
> http://xmlgraphics.apache.org/fop/0.93/fonts.html
> Pay attention to last topic. Theoretically if you have font Helvetica
> you can embed it as any other.
>
>
> > We need this property because we have fop.xconf and font metrics
> > installed
> > and we don't want to modify and/or merge all pdf files.
> >
> > Krzysztof Podejma
> >
> > 2007/6/27, Oleg Andreyev <td...@mail.ru>:
> >>
> >> -1
> >> There are no universal solutions in this field.
> >> What's happened if somebody will add Arial(or Tahoma, or something
> else)
> >> as value this property in current distribution?
> >> Nothing. Just another error message in log.
> >> I have the same problems with Cyrillic fonts but apart from accessible
> >> programmatically default font name we need right fop.xconf, metrics and
> >> fonts itself installed in the system. Such property may be useful only
> >> if you well understand the rest configuration tasks. This is a point of
> >> mistake.
> >>
> >> As remark. I'd like to see standard fop.xconf in the trunk. One from
> FOP
> >> distribution just well commented and can be used as guide by new users
> >> and developers.
> >> https://issues.apache.org/jira/browse/OFBIZ-990
> >>
> >> If fop.xconf will in trunk, it would be rightly move page height/width
> >> to config as part of the localization process. Now these hardcoded tags
> >> define Letter, not widely used paper format outside US.
> >>
> >>
> >> Krzysztof Podejma пишет:
> >> > yes me too +1 general.properties with default fop font
> >> >
> >> >
> >> > 2007/6/27, Jacques Le Roux <ja...@les7arts.com>:
> >> >>
> >> >> +1 for  general.properties
> >> >>
> >> >> Jacques
> >> >>
> >> >> De : "Krzysztof Podejma" <kp...@gmail.com>
> >> >> > big thanks it works perfect.
> >> >> > I think the pdf font should be parametrized somewhere in
> properties
> >> >> i.e
> >> >> > general.properties
> >> >> >
> >> >> > I've found that there are used two different fonts: one when you
> >> set
> >> >> > font-family="" and another one when you dont't specify this
> >> attribute.
> >> >> > maybe the second one is set somewhere...
> >> >> >
> >> >> > Krzysztof Podejma
> >> >> >
> >> >> >
> >> >> > 2007/6/27, Christian Geisert <ch...@isu-gmbh.de>:
> >> >> > >
> >> >> > > Krzysztof Podejma schrieb:
> >> >> > > > Hello,
> >> >> > > > I need polish characters in pdf files, so I have to set FOP
> >> >> default
> >> >> font
> >> >> > > to
> >> >> > > > Arial.
> >> >> > > > I've configured fop.xconf to use Arial and generated font
> >> files.
> >> >> > > > It works well when I change font-family for blocks in fo files
> >> >> but I
> >> >> > > don't
> >> >> > > > want to modify all files.
> >> >> > >
> >> >> > > You can declare the font-family in the fo:root element which
> >> >> means you
> >> >> > > don't have to do it on every block, just once per document.
> >> >> > >
> >> >> > > > Do you happen to know how to do this?
> >> >> > >
> >> >> > > The default-value for the font-family property is 'sans-serif'
> >> >> > > (Helvetica) which is hard coded in FOP.
> >> >> > >
> >> >> > > But if you work with FoDecorator/FoReportDecorator - which you
> >> >> should
> >> >> > > should do IMHO - you can declare it there and don't have to
> worry
> >> >> about
> >> >> > > in every report.
> >> >> > >
> >> >> > > --
> >> >> > > Christian
> >> >> > >
> >> >> > >
> >> >> > >
> >> >> >
> >> >>
> >> >
> >>
>

Re: FOP default font

Posted by Oleg Andreyev <td...@mail.ru>.

Krzysztof Podejma пишет:
> in trunk - current distribution default value would stay as it is now, 
> and
> nobody will change it to font that use metrics that aren't in trunk.
> I think it is good idea to change default font in one place instead of
> modifying all reports each.
IMHO, for custom solutions replace works faster:) But you are right on 
the whole.
>
> if you want to have more than one font in your pdf you can always 
> override a
> font-family for block or for entire document.
> this property would have ability to not take effect if not set
>
> Nobody wants to crash anything, we want to have less work because we use
> non-English characters and it is a pain to track all new pdf's and 
> check if
> they print correctly.
>
> +1 fop.xconf
> AFAIK fop.xconf is necessary for custom fonts but you cannot set default
> font in fop.xconf, correct me if I'm wrong
http://xmlgraphics.apache.org/fop/0.93/fonts.html
Pay attention to last topic. Theoretically if you have font Helvetica 
you can embed it as any other.
 

> We need this property because we have fop.xconf and font metrics 
> installed
> and we don't want to modify and/or merge all pdf files.
>
> Krzysztof Podejma
>
> 2007/6/27, Oleg Andreyev <td...@mail.ru>:
>>
>> -1
>> There are no universal solutions in this field.
>> What's happened if somebody will add Arial(or Tahoma, or something else)
>> as value this property in current distribution?
>> Nothing. Just another error message in log.
>> I have the same problems with Cyrillic fonts but apart from accessible
>> programmatically default font name we need right fop.xconf, metrics and
>> fonts itself installed in the system. Such property may be useful only
>> if you well understand the rest configuration tasks. This is a point of
>> mistake.
>>
>> As remark. I'd like to see standard fop.xconf in the trunk. One from FOP
>> distribution just well commented and can be used as guide by new users
>> and developers.
>> https://issues.apache.org/jira/browse/OFBIZ-990
>>
>> If fop.xconf will in trunk, it would be rightly move page height/width
>> to config as part of the localization process. Now these hardcoded tags
>> define Letter, not widely used paper format outside US.
>>
>>
>> Krzysztof Podejma пишет:
>> > yes me too +1 general.properties with default fop font
>> >
>> >
>> > 2007/6/27, Jacques Le Roux <ja...@les7arts.com>:
>> >>
>> >> +1 for  general.properties
>> >>
>> >> Jacques
>> >>
>> >> De : "Krzysztof Podejma" <kp...@gmail.com>
>> >> > big thanks it works perfect.
>> >> > I think the pdf font should be parametrized somewhere in properties
>> >> i.e
>> >> > general.properties
>> >> >
>> >> > I've found that there are used two different fonts: one when you 
>> set
>> >> > font-family="" and another one when you dont't specify this
>> attribute.
>> >> > maybe the second one is set somewhere...
>> >> >
>> >> > Krzysztof Podejma
>> >> >
>> >> >
>> >> > 2007/6/27, Christian Geisert <ch...@isu-gmbh.de>:
>> >> > >
>> >> > > Krzysztof Podejma schrieb:
>> >> > > > Hello,
>> >> > > > I need polish characters in pdf files, so I have to set FOP
>> >> default
>> >> font
>> >> > > to
>> >> > > > Arial.
>> >> > > > I've configured fop.xconf to use Arial and generated font 
>> files.
>> >> > > > It works well when I change font-family for blocks in fo files
>> >> but I
>> >> > > don't
>> >> > > > want to modify all files.
>> >> > >
>> >> > > You can declare the font-family in the fo:root element which
>> >> means you
>> >> > > don't have to do it on every block, just once per document.
>> >> > >
>> >> > > > Do you happen to know how to do this?
>> >> > >
>> >> > > The default-value for the font-family property is 'sans-serif'
>> >> > > (Helvetica) which is hard coded in FOP.
>> >> > >
>> >> > > But if you work with FoDecorator/FoReportDecorator - which you
>> >> should
>> >> > > should do IMHO - you can declare it there and don't have to worry
>> >> about
>> >> > > in every report.
>> >> > >
>> >> > > --
>> >> > > Christian
>> >> > >
>> >> > >
>> >> > >
>> >> >
>> >>
>> >
>>

Re: FOP default font

Posted by Krzysztof Podejma <kp...@gmail.com>.
in trunk - current distribution default value would stay as it is now, and
nobody will change it to font that use metrics that aren't in trunk.
I think it is good idea to change default font in one place instead of
modifying all reports each.
if you want to have more than one font in your pdf you can always override a
font-family for block or for entire document.
this property would have ability to not take effect if not set

Nobody wants to crash anything, we want to have less work because we use
non-English characters and it is a pain to track all new pdf's and check if
they print correctly.

+1 fop.xconf
AFAIK fop.xconf is necessary for custom fonts but you cannot set default
font in fop.xconf, correct me if I'm wrong
We need this property because we have fop.xconf and font metrics installed
and we don't want to modify and/or merge all pdf files.

Krzysztof Podejma

2007/6/27, Oleg Andreyev <td...@mail.ru>:
>
> -1
> There are no universal solutions in this field.
> What's happened if somebody will add Arial(or Tahoma, or something else)
> as value this property in current distribution?
> Nothing. Just another error message in log.
> I have the same problems with Cyrillic fonts but apart from accessible
> programmatically default font name we need right fop.xconf, metrics and
> fonts itself installed in the system. Such property may be useful only
> if you well understand the rest configuration tasks. This is a point of
> mistake.
>
> As remark. I'd like to see standard fop.xconf in the trunk. One from FOP
> distribution just well commented and can be used as guide by new users
> and developers.
> https://issues.apache.org/jira/browse/OFBIZ-990
>
> If fop.xconf will in trunk, it would be rightly move page height/width
> to config as part of the localization process. Now these hardcoded tags
> define Letter, not widely used paper format outside US.
>
>
> Krzysztof Podejma пишет:
> > yes me too +1 general.properties with default fop font
> >
> >
> > 2007/6/27, Jacques Le Roux <ja...@les7arts.com>:
> >>
> >> +1 for  general.properties
> >>
> >> Jacques
> >>
> >> De : "Krzysztof Podejma" <kp...@gmail.com>
> >> > big thanks it works perfect.
> >> > I think the pdf font should be parametrized somewhere in properties
> >> i.e
> >> > general.properties
> >> >
> >> > I've found that there are used two different fonts: one when you set
> >> > font-family="" and another one when you dont't specify this
> attribute.
> >> > maybe the second one is set somewhere...
> >> >
> >> > Krzysztof Podejma
> >> >
> >> >
> >> > 2007/6/27, Christian Geisert <ch...@isu-gmbh.de>:
> >> > >
> >> > > Krzysztof Podejma schrieb:
> >> > > > Hello,
> >> > > > I need polish characters in pdf files, so I have to set FOP
> >> default
> >> font
> >> > > to
> >> > > > Arial.
> >> > > > I've configured fop.xconf to use Arial and generated font files.
> >> > > > It works well when I change font-family for blocks in fo files
> >> but I
> >> > > don't
> >> > > > want to modify all files.
> >> > >
> >> > > You can declare the font-family in the fo:root element which
> >> means you
> >> > > don't have to do it on every block, just once per document.
> >> > >
> >> > > > Do you happen to know how to do this?
> >> > >
> >> > > The default-value for the font-family property is 'sans-serif'
> >> > > (Helvetica) which is hard coded in FOP.
> >> > >
> >> > > But if you work with FoDecorator/FoReportDecorator - which you
> >> should
> >> > > should do IMHO - you can declare it there and don't have to worry
> >> about
> >> > > in every report.
> >> > >
> >> > > --
> >> > > Christian
> >> > >
> >> > >
> >> > >
> >> >
> >>
> >
>

Re: FOP default font

Posted by Oleg Andreyev <td...@mail.ru>.
-1
There are no universal solutions in this field.
What’s happened if somebody will add Arial(or Tahoma, or something else) 
as value this property in current distribution?
Nothing. Just another error message in log.
I have the same problems with Cyrillic fonts but apart from accessible 
programmatically default font name we need right fop.xconf, metrics and 
fonts itself installed in the system. Such property may be useful only 
if you well understand the rest configuration tasks. This is a point of 
mistake.

As remark. I'd like to see standard fop.xconf in the trunk. One from FOP 
distribution just well commented and can be used as guide by new users 
and developers.
https://issues.apache.org/jira/browse/OFBIZ-990

If fop.xconf will in trunk, it would be rightly move page height/width 
to config as part of the localization process. Now these hardcoded tags 
define Letter, not widely used paper format outside US.   


Krzysztof Podejma пишет:
> yes me too +1 general.properties with default fop font
>
>
> 2007/6/27, Jacques Le Roux <ja...@les7arts.com>:
>>
>> +1 for  general.properties
>>
>> Jacques
>>
>> De : "Krzysztof Podejma" <kp...@gmail.com>
>> > big thanks it works perfect.
>> > I think the pdf font should be parametrized somewhere in properties 
>> i.e
>> > general.properties
>> >
>> > I've found that there are used two different fonts: one when you set
>> > font-family="" and another one when you dont't specify this attribute.
>> > maybe the second one is set somewhere...
>> >
>> > Krzysztof Podejma
>> >
>> >
>> > 2007/6/27, Christian Geisert <ch...@isu-gmbh.de>:
>> > >
>> > > Krzysztof Podejma schrieb:
>> > > > Hello,
>> > > > I need polish characters in pdf files, so I have to set FOP 
>> default
>> font
>> > > to
>> > > > Arial.
>> > > > I've configured fop.xconf to use Arial and generated font files.
>> > > > It works well when I change font-family for blocks in fo files 
>> but I
>> > > don't
>> > > > want to modify all files.
>> > >
>> > > You can declare the font-family in the fo:root element which 
>> means you
>> > > don't have to do it on every block, just once per document.
>> > >
>> > > > Do you happen to know how to do this?
>> > >
>> > > The default-value for the font-family property is 'sans-serif'
>> > > (Helvetica) which is hard coded in FOP.
>> > >
>> > > But if you work with FoDecorator/FoReportDecorator - which you 
>> should
>> > > should do IMHO - you can declare it there and don't have to worry
>> about
>> > > in every report.
>> > >
>> > > --
>> > > Christian
>> > >
>> > >
>> > >
>> >
>>
>

Re: FOP default font

Posted by Krzysztof Podejma <kp...@gmail.com>.
yes me too +1 general.properties with default fop font


2007/6/27, Jacques Le Roux <ja...@les7arts.com>:
>
> +1 for  general.properties
>
> Jacques
>
> De : "Krzysztof Podejma" <kp...@gmail.com>
> > big thanks it works perfect.
> > I think the pdf font should be parametrized somewhere in properties i.e
> > general.properties
> >
> > I've found that there are used two different fonts: one when you set
> > font-family="" and another one when you dont't specify this attribute.
> > maybe the second one is set somewhere...
> >
> > Krzysztof Podejma
> >
> >
> > 2007/6/27, Christian Geisert <ch...@isu-gmbh.de>:
> > >
> > > Krzysztof Podejma schrieb:
> > > > Hello,
> > > > I need polish characters in pdf files, so I have to set FOP default
> font
> > > to
> > > > Arial.
> > > > I've configured fop.xconf to use Arial and generated font files.
> > > > It works well when I change font-family for blocks in fo files but I
> > > don't
> > > > want to modify all files.
> > >
> > > You can declare the font-family in the fo:root element which means you
> > > don't have to do it on every block, just once per document.
> > >
> > > > Do you happen to know how to do this?
> > >
> > > The default-value for the font-family property is 'sans-serif'
> > > (Helvetica) which is hard coded in FOP.
> > >
> > > But if you work with FoDecorator/FoReportDecorator - which you should
> > > should do IMHO - you can declare it there and don't have to worry
> about
> > > in every report.
> > >
> > > --
> > > Christian
> > >
> > >
> > >
> >
>

Re: FOP default font

Posted by Jacques Le Roux <ja...@les7arts.com>.
+1 for  general.properties

Jacques

De : "Krzysztof Podejma" <kp...@gmail.com>
> big thanks it works perfect.
> I think the pdf font should be parametrized somewhere in properties i.e
> general.properties
> 
> I've found that there are used two different fonts: one when you set
> font-family="" and another one when you dont't specify this attribute.
> maybe the second one is set somewhere...
> 
> Krzysztof Podejma
> 
> 
> 2007/6/27, Christian Geisert <ch...@isu-gmbh.de>:
> >
> > Krzysztof Podejma schrieb:
> > > Hello,
> > > I need polish characters in pdf files, so I have to set FOP default font
> > to
> > > Arial.
> > > I've configured fop.xconf to use Arial and generated font files.
> > > It works well when I change font-family for blocks in fo files but I
> > don't
> > > want to modify all files.
> >
> > You can declare the font-family in the fo:root element which means you
> > don't have to do it on every block, just once per document.
> >
> > > Do you happen to know how to do this?
> >
> > The default-value for the font-family property is 'sans-serif'
> > (Helvetica) which is hard coded in FOP.
> >
> > But if you work with FoDecorator/FoReportDecorator - which you should
> > should do IMHO - you can declare it there and don't have to worry about
> > in every report.
> >
> > --
> > Christian
> >
> >
> >
> 

Re: FOP default font

Posted by Krzysztof Podejma <kp...@gmail.com>.
big thanks it works perfect.
I think the pdf font should be parametrized somewhere in properties i.e
general.properties

I've found that there are used two different fonts: one when you set
font-family="" and another one when you dont't specify this attribute.
maybe the second one is set somewhere...

Krzysztof Podejma


2007/6/27, Christian Geisert <ch...@isu-gmbh.de>:
>
> Krzysztof Podejma schrieb:
> > Hello,
> > I need polish characters in pdf files, so I have to set FOP default font
> to
> > Arial.
> > I've configured fop.xconf to use Arial and generated font files.
> > It works well when I change font-family for blocks in fo files but I
> don't
> > want to modify all files.
>
> You can declare the font-family in the fo:root element which means you
> don't have to do it on every block, just once per document.
>
> > Do you happen to know how to do this?
>
> The default-value for the font-family property is 'sans-serif'
> (Helvetica) which is hard coded in FOP.
>
> But if you work with FoDecorator/FoReportDecorator - which you should
> should do IMHO - you can declare it there and don't have to worry about
> in every report.
>
> --
> Christian
>
>
>

Re: FOP default font

Posted by Christian Geisert <ch...@isu-gmbh.de>.
Krzysztof Podejma schrieb:
> Hello,
> I need polish characters in pdf files, so I have to set FOP default font to
> Arial.
> I've configured fop.xconf to use Arial and generated font files.
> It works well when I change font-family for blocks in fo files but I don't
> want to modify all files.

You can declare the font-family in the fo:root element which means you
don't have to do it on every block, just once per document.

> Do you happen to know how to do this?

The default-value for the font-family property is 'sans-serif'
(Helvetica) which is hard coded in FOP.

But if you work with FoDecorator/FoReportDecorator - which you should
should do IMHO - you can declare it there and don't have to worry about
in every report.

-- 
Christian