PDF generator customization for eastern european letters

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

PDF generator customization for eastern european letters

dulepg

We are successfuly using Form Builder but there is problem of generating
Central European characters Ć/ć, Č/č and Đ/đ.
Š/š and Ž/ž are showing fine but Ć/ć, Č/č, Đ/đ are not showing in
generated PDF at all.

I tried to specify <property as="xs:string" name="oxf.fr.pdf.font.path.vera"
value="C:/DejaVuSans.ttf"/>
<property as="xs:string" name="oxf.fr.pdf.font.family.vera"
value="DejaVuSans"/>
but it even does not pick up the DejaVuSans in notemplate mode.

Now, would you recommend the solution of embedding the font as above or maybe
try to modify XSL-FO converter.
Maybe changing the encoding to ISO 8859-2 or Windows-1250 in some scripts?

Thanks in advance.

--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: PDF generator customization for eastern european letters

Erik Bruchez
Administrator
The oxf.fr.pdf.font.path was introduced in September 2011. Maybe that
setting is not present in the build you are using? The fix is not in
3.9.0, but is included in 3.9.1.

-Erik

On Wed, Mar 21, 2012 at 5:07 AM, dulepg <[hidden email]> wrote:

>
> We are successfuly using Form Builder but there is problem of generating
> Central European characters Ć/ć, Č/č and Đ/đ.
> Š/š and Ž/ž are showing fine but Ć/ć, Č/č, Đ/đ are not showing in
> generated PDF at all.
>
> I tried to specify <property as="xs:string" name="oxf.fr.pdf.font.path.vera"
> value="C:/DejaVuSans.ttf"/>
> <property as="xs:string" name="oxf.fr.pdf.font.family.vera"
> value="DejaVuSans"/>
> but it even does not pick up the DejaVuSans in notemplate mode.
>
> Now, would you recommend the solution of embedding the font as above or maybe
> try to modify XSL-FO converter.
> Maybe changing the encoding to ISO 8859-2 or Windows-1250 in some scripts?
>
> Thanks in advance.
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: PDF generator customization for eastern european letters

dulepg
In reply to this post by dulepg
You were right, it was 3.9.0, but it does not work either with 3.9.1. What I
get is PDF with Helvetica non embedded fonts of Type1, Encoding: Ansi, Actual
Font: Arial MT and Actual Font type: TrueType.
It seems that XHTMLToPDFProcessor has loaded the ttf since it fails in debug
log if I state the wrong path: - Failed to load font by path:
'D:/DejaVuSans.ttf' specified with property 'oxf.fr.pdf.font.path.vera'. With
proper path it does not report anything in Debug log, which is also strange.
Most suspicious to me is Ansi Encoding. I would expect UTF8.

What would you recommend for further investigation?

Regards,
Dusko


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: PDF generator customization for eastern european letters

dulepg
In reply to this post by dulepg
Problem is solved by simply stating the font Family: Arial.
This works, even cyrillic:
<property as="xs:string" name="oxf.fr.pdf.font.path.vera"
value="c:/DejaVuSans.ttf"/>
<property as="xs:string" name="oxf.fr.pdf.font.family.vera" value="Arial"/>

Regards,
Dusko


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: PDF generator customization for eastern european letters

Erik Bruchez
Administrator
Dusko,

Great, thanks for confirming this.

-Erik

On Fri, Mar 23, 2012 at 5:30 AM, dulepg <[hidden email]> wrote:

> Problem is solved by simply stating the font Family: Arial.
> This works, even cyrillic:
> <property as="xs:string" name="oxf.fr.pdf.font.path.vera"
> value="c:/DejaVuSans.ttf"/>
> <property as="xs:string" name="oxf.fr.pdf.font.family.vera" value="Arial"/>
>
> Regards,
> Dusko
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: PDF generator customization for eastern european letters

Jacek Pardyak
In my case [ubuntu 12.04 LTS / tomcat7 / orbeon 4.4 CE] works following code instead:
<property as="xs:string" name="oxf.fr.pdf.font.path.vera" value="/usr/share/fonts/truetype/liberation/LiberationMono-Regular.ttf"/>
<property as="xs:string" name="oxf.fr.pdf.font.family.vera" value="Helvetica Neue"/>

which displays properly the Polish and Cyrillic characters.
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: PDF generator customization for eastern european letters

Erik Bruchez
Administrator
Cool, thanks for sharing!

-Erik
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: PDF generator customization for eastern european letters

yoyoooyoy
Hi,

we've tried to create a new form [Orbeon 4.2] with simply one label that contains some latin characters and some cyrillic characters, but Dusko's solution has not worked for us (using another ttf file that supports cyrillic).

<property as="xs:string" name="oxf.fr.pdf.font.path.vera"  value="c:/DejaVuSans.ttf"/> 
<property as="xs:string" name="oxf.fr.pdf.font.family.vera" value="Arial"/> 

So maybe we are placing them in the wrong file, where exactly should this lines be?
Is there any ttf file already included in our version or in any newer that we could use?
Do any newer Orbeon version solve this issue without any extra configuration?

Thanks in advance
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: PDF generator customization for eastern european letters

Erik Bruchez
Administrator
For reference, here is a configuration which works. The trick is that the actual font which the PDF sees is not "Arial", but "Helvetica Neue". So you have to map the font. You can do this as follows:

    <property
        as="xs:string"
        name="oxf.fr.pdf.font.path.arial"
        value="/path/to/arial.ttf"/>

    <property
        as="xs:string"
        name="oxf.fr.pdf.font.family.arial"
        value="Helvetica Neue"/>

-Erik