You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Nikolaos Paraschou <ni...@gmail.com> on 2010/08/29 18:35:14 UTC

Greek text in the HelloWorld example causes Severe Exception

Hello,

This is the first time I am using Apache FOP. I started with the quick
start guide and the Hello World example which worked just fine (with
Latin characters). I decided to replace "Frank" with a name in Greek
characters, lets say "Νίκος".

I copied "fop.xonf" to "userconfig.xml" and edited the <fonts> tag to
look like this:

<fonts>
         <!-- register all the fonts found in a directory -->
         <directory>C:\Users\nikos\MyFonts</directory>
</fonts>

Then I copied arial.ttf from C:\Windows\Fonts to
C:\Users\nikos\MyFonts. I opened arial.ttf with the Windows program
Character Map to inspect it and make sure it contains Greek glyphs. It
does contain Greek glyphs.

When I ran the command:

fop -c userconfig.xml -xml name.xml -xsl name2fo.xsl -pdf name.pdf

I got back the following severe exception:

C:\Users\nikos\Desktop>fop -c myconfig.xml -xml name.xml -xsl name2fo.xsl -pdf n
ame.pdf
29 ┴Ϋή 2010 7:17:22 ΉΉ org.apache.fop.apps.FopFactoryConfigurator configure
INFO: Default page-height set to: 11in
29 ┴Ϋή 2010 7:17:22 ΉΉ org.apache.fop.apps.FopFactoryConfigurator configure
INFO: Default page-width set to: 8.26in
29 ┴Ϋή 2010 7:17:22 ΉΉ org.apache.fop.cli.Main startFOP
SEVERE: Exception
javax.xml.transform.TransformerException: Invalid byte 2 of 2-byte UTF-8 sequenc
e.
        at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:302)
        at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:130)
        at org.apache.fop.cli.Main.startFOP(Main.java:174)
        at org.apache.fop.cli.Main.main(Main.java:205)
Caused by: javax.xml.transform.TransformerException: Invalid byte 2 of 2-byte UT
F-8 sequence.
        at org.apache.xalan.transformer.TransformerImpl.fatalError(TransformerIm
pl.java:780)
        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
l.java:756)
        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
l.java:1284)
        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
l.java:1262)
        at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:299)
        ... 3 more

---------

; SystemID: file:/C:/Users/nikos/Desktop/name.xml; Line#: 1; Column#: 7
javax.xml.transform.TransformerException: Invalid byte 2 of 2-byte UTF-8 sequenc
e.
        at org.apache.xalan.transformer.TransformerImpl.fatalError(TransformerIm
pl.java:780)
        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
l.java:756)
        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
l.java:1284)
        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
l.java:1262)
        at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:299)
        at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:130)
        at org.apache.fop.cli.Main.startFOP(Main.java:174)
        at org.apache.fop.cli.Main.main(Main.java:205)


I am using FOP version 1.0 in Windows 7 x64 and java version "1.6.0_21".

Thank you,
Nikos

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Greek text in the HelloWorld example causes Severe Exception

Posted by Glenn Adams <gl...@skynav.com>.
Ah, ignore my last, I see this has already been suggested and fixed.
Regarding glyph selection, you need to ensure that the font contains a CMAP
entry for the required characters,
namely: &#x039D;&#x03AF;&#x03BA;&#x03BF;&#x03C2;

I just ran this on FOP 1.0 on Mac OS X 10.6 using both Arial and Times New
Roman, and both render successfully.

G.

On Mon, Aug 30, 2010 at 9:06 AM, Glenn Adams <gl...@skynav.com> wrote:

> Have you checked that you are using UTF-8 encoding in your FO file? If you
> read the exception below, it is complaining about the coding in the input
> file.
>
> G.
>
>

Re: Greek text in the HelloWorld example causes Severe Exception

Posted by Glenn Adams <gl...@skynav.com>.
Have you checked that you are using UTF-8 encoding in your FO file? If you
read the exception below, it is complaining about the coding in the input
file.

G.

On Mon, Aug 30, 2010 at 12:35 AM, Nikolaos Paraschou <ni...@gmail.com>wrote:

> Hello,
>
> This is the first time I am using Apache FOP. I started with the quick
> start guide and the Hello World example which worked just fine (with
> Latin characters). I decided to replace "Frank" with a name in Greek
> characters, lets say "Νίκος".
>
> I copied "fop.xonf" to "userconfig.xml" and edited the <fonts> tag to
> look like this:
>
> <fonts>
>         <!-- register all the fonts found in a directory -->
>         <directory>C:\Users\nikos\MyFonts</directory>
> </fonts>
>
> Then I copied arial.ttf from C:\Windows\Fonts to
> C:\Users\nikos\MyFonts. I opened arial.ttf with the Windows program
> Character Map to inspect it and make sure it contains Greek glyphs. It
> does contain Greek glyphs.
>
> When I ran the command:
>
> fop -c userconfig.xml -xml name.xml -xsl name2fo.xsl -pdf name.pdf
>
> I got back the following severe exception:
>
> C:\Users\nikos\Desktop>fop -c myconfig.xml -xml name.xml -xsl name2fo.xsl
> -pdf n
> ame.pdf
> 29 ┴Ϋή 2010 7:17:22 ΉΉ org.apache.fop.apps.FopFactoryConfigurator configure
> INFO: Default page-height set to: 11in
> 29 ┴Ϋή 2010 7:17:22 ΉΉ org.apache.fop.apps.FopFactoryConfigurator configure
> INFO: Default page-width set to: 8.26in
> 29 ┴Ϋή 2010 7:17:22 ΉΉ org.apache.fop.cli.Main startFOP
> SEVERE: Exception
> javax.xml.transform.TransformerException: Invalid byte 2 of 2-byte UTF-8
> sequenc
> e.
>        at
> org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:302)
>        at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:130)
>        at org.apache.fop.cli.Main.startFOP(Main.java:174)
>        at org.apache.fop.cli.Main.main(Main.java:205)
> Caused by: javax.xml.transform.TransformerException: Invalid byte 2 of
> 2-byte UT
> F-8 sequence.
>        at
> org.apache.xalan.transformer.TransformerImpl.fatalError(TransformerIm
> pl.java:780)
>        at
> org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
> l.java:756)
>        at
> org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
> l.java:1284)
>        at
> org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
> l.java:1262)
>        at
> org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:299)
>        ... 3 more
>
> ---------
>
> ; SystemID: file:/C:/Users/nikos/Desktop/name.xml; Line#: 1; Column#: 7
> javax.xml.transform.TransformerException: Invalid byte 2 of 2-byte UTF-8
> sequenc
> e.
>        at
> org.apache.xalan.transformer.TransformerImpl.fatalError(TransformerIm
> pl.java:780)
>        at
> org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
> l.java:756)
>        at
> org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
> l.java:1284)
>        at
> org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
> l.java:1262)
>        at
> org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:299)
>        at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:130)
>        at org.apache.fop.cli.Main.startFOP(Main.java:174)
>        at org.apache.fop.cli.Main.main(Main.java:205)
>
>
> I am using FOP version 1.0 in Windows 7 x64 and java version "1.6.0_21".
>
> Thank you,
> Nikos
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>

Re: Greek text in the HelloWorld example causes Severe Exception

Posted by "Christopher R. Maden" <cr...@maden.org>.
Nikolaos Paraschou wrote:
> This is the first time I am using Apache FOP. I started with the quick
> start guide and the Hello World example which worked just fine (with
> Latin characters). I decided to replace "Frank" with a name in Greek
> characters, lets say "Νίκος".
> 
> ; SystemID: file:/C:/Users/nikos/Desktop/name.xml; Line#: 1; Column#: 7
> javax.xml.transform.TransformerException: Invalid byte 2 of 2-byte UTF-8 sequenc
> e.

I suspect you have a bad second byte of a 2-byte UTF-8 sequence on line
1 of name.xml. (-:

This is not a FOP question; the problem is happening when the XML parser
tries to read your input XML file.

I suspect that the editor you used to edit the XML file used ISO 8859-7
instead of UTF-8, but that you did not give an appropriate encoding
declaration.  The easiest way to avoid these problems is to instruct
your editor to always save as UTF-8, which is one of the default
encodings for XML, and needs no declaration.

~Chris
-- 
Chris Maden, text nerd  <URL: http://crism.maden.org/ >
“I like being free, and that makes me an idiot, I suppose.”
  — Stan Rogers, “The Idiot”
GnuPG Fingerprint: C6E4 E2A9 C9F8 71AC 9724 CAA3 19F8 6677 0077 C319

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Greek text in the HelloWorld example causes Severe Exception

Posted by Spyros Papantoniou <sp...@gmail.com>.
Symbol has no tonos whatsoever, FOP will always replace the unfound character with #.
Symbol has only {ΑΒΓΔ.. Ω, αβγφ.. ω} this makes 48 Greek characters total.

You have to use a font like Arial.ttf that includes the complete 128 greek glyphs.


Spyros Papantoniou, PhD



On 30 Αυγ 2010, at 7:37 μ.μ., Nikolaos Paraschou wrote:

> Unfortunately FOP insists to put a "#" in place of "ί".
> 
> I can confirm that Arial.ttf contains a CMAP entry for all the required characters. I opened Arial.ttf with Character Map (the Windows utility for viewing fonts). There I inserted code "03af" and it showed the character "ί".
> The same applies for FreeSans.ttf.
> 
> myconfig2.xml contains exactly this code:
> 
> <?xml version="1.0" encoding="utf-8"?>
> 
> <fop version="1.0">
>   <renderers>
>     <renderer mime="application/pdf">
>       <fonts>
>         <font embed-url="file:///C:/Users/nikos/MyFonts/arial.ttf">
>           <font-triplet name="arial" style="normal" weight="normal"/>
>         </font>
>       </fonts>
>     </renderer>
>    </renderers>
> </fop>
> 
> Since I explicitly tell FOP to use arial.ttf, why does it not use it? I also tried this on a Mac OS X 10.6 using Arial with no success. I get the same warning telling iotatonos couldn't be found in font 'Symbol'.
> 
> Maybe I am doing something else wrong?
> 
> Nikos
> 
> 
> 
> 2010/8/30 Spyros Papantoniou <sp...@gmail.com>
> Dont use Symbol!
> Its a mess it has only the 24 Greek letters not accents, not dialysis...
> 
> Find a font that has full UTF-8 glyph set in Greek,
> like on the Mac Arial, Times New Roman, Helvetica all have it.
> I dont have Windoze to check which fonts have the full glyph set.
> 
> FreeSans I discovered is no good either, nor DINRg
> 
> Spyros
> 
> 
> 
> On 30 Αυγ 2010, at 1:04 π.μ., Nikolaos Paraschou wrote:
> 
> > We made some progress I think. I converted "name.xml", "name2fo.xsl"
> > and "myconfig2.xml" from ANSI to UTF-8 (all three files begin with
> > <?xml version="1.0" encoding="UTF-8"?> ) and then ran the command:
> >
> > fop -c myconfig2.xml -xml name.xml -xsl name2fo.xsl -pdf name.pdf
> >
> > which produced the following output:
> >
> > C:\Users\nikos\Desktop>fop -c myconfig2.xml -xml name.xml -xsl name2fo.xsl -pdf
> > name.pdf
> > 30 +Ϋή 2010 12:37:38 ΏΉ org.apache.fop.events.LoggingEventListener processEvent
> > WARNING: Glyph "-" (0x3af, iotatonos) not available in font "Symbol".
> >
> > The word inside "name.xml" is "Νίκος". After the conversion the pdf
> > displays "Hello, Ν#κος!" (with the name aligned a bit lower than
> > Hello,). Obviously, FOP isn't looking for iotatonos inside Arial.ttf
> > or Freesans.ttf (I've tried it with both fonts), but instead it is
> > trying to find iotatonos inside font "Symbol". Why is this happening?
> >
> > I opened Arial.ttf and FreeSans.ttf with Character Map. The
> > description these two fonts have for the character " ί " is:
> >
> > "U+03AF: Greek Small Letter Iota With Tonos"
> >
> > So, FOP is looking for " ί " in Arial and FreeSans as "iotatonos" but
> > it's not there with that descritpion. Maybe that's why it's looking in
> > font "Symbol" later on (correct me if I am wrong). How could this
> > problem be solved?
> >
> > Thank you again,
> > Nikos
> >
> >
> > 2010/8/30 Spyros Papantoniou <sp...@gmail.com>:
> >> The "Invalid byte 2 of 2-byte UTF-8 se" points to not proper UTF encoding somewhere.
> >> I tested FOP 0.95 and it works with Greek!
> >> Do not use FreeSans, as it does include Greek glyphs [I found out the hard way..]
> >> I use Arial.ttf on the Mac with success.
> >>
> >>
> >> Are all your files UTF8 and their header UTF-8?  like:
> >>
> >>  <?xml version="1.0" encoding="UTF-8"?>
> >>
> >> Spyros Papantoniou, PhD
> >>
> >>
> >>
> >>
> >>
> >>
> >> On 30 Αυγ 2010, at 12:10 π.μ., Nikolaos Paraschou wrote:
> >>
> >>> First of all, thank you for your reply Spyros.
> >>>
> >>> I created myconfig2.xml with exactly the following code:
> >>>
> >>> <fop version="1.0">
> >>>  <renderers>
> >>>    <renderer mime="application/pdf">
> >>>      <fonts>
> >>>        <font   embed-url="file:///Users/nikos/MyFonts/FreeSans.ttf">
> >>>          <font-triplet name="FreeSans" style="normal" weight="normal"/>
> >>>        </font>
> >>>      </fonts>
> >>>    </renderer>
> >>>   </renderers>
> >>> </fop>
> >>>
> >>> and then I run the command:
> >>>
> >>> fop -c myconfig2.xml -xml name.xml -xsl name2fo.xsl -pdf name.pdf
> >>>
> >>> which produced again a severe exception:
> >>>
> >>> C:\Users\nikos\Desktop>fop -c myconfig2.xml -xml name.xml -xsl name2fo.xsl -pdf
> >>> name.pdf
> >>> 29 +Ϋή 2010 11:57:59 ΉΉ org.apache.fop.cli.Main startFOP
> >>> SEVERE: Exception
> >>> javax.xml.transform.TransformerException: Invalid byte 2 of 2-byte UTF-8 sequenc
> >>> e.
> >>>        at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:302)
> >>>        at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:130)
> >>>        at org.apache.fop.cli.Main.startFOP(Main.java:174)
> >>>        at org.apache.fop.cli.Main.main(Main.java:205)
> >>> Caused by: javax.xml.transform.TransformerException: Invalid byte 2 of 2-byte UT
> >>> F-8 sequence.
> >>>        at org.apache.xalan.transformer.TransformerImpl.fatalError(TransformerIm
> >>> pl.java:780)
> >>>        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
> >>> l.java:756)
> >>>        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
> >>> l.java:1284)
> >>>        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
> >>> l.java:1262)
> >>>        at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:299)
> >>>        ... 3 more
> >>>
> >>> ---------
> >>>
> >>> ; SystemID: file:/C:/Users/nikos/Desktop/name.xml; Line#: 1; Column#: 7
> >>> javax.xml.transform.TransformerException: Invalid byte 2 of 2-byte UTF-8 sequenc
> >>> e.
> >>>        at org.apache.xalan.transformer.TransformerImpl.fatalError(TransformerIm
> >>> pl.java:780)
> >>>        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
> >>> l.java:756)
> >>>        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
> >>> l.java:1284)
> >>>        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
> >>> l.java:1262)
> >>>        at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:299)
> >>>        at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:130)
> >>>        at org.apache.fop.cli.Main.startFOP(Main.java:174)
> >>>        at org.apache.fop.cli.Main.main(Main.java:205)
> >>>
> >>>
> >>> Obviously I am missing something here. Any idea what might that be?
> >>>
> >>> Thank you,
> >>> Nikos
> >>>
> >>>
> >>>
> >>>
> >>> 2010/8/29 Spyros Papantoniou <sp...@gmail.com>:
> >>>> Better use something like:
> >>>> <fop version="1.0">
> >>>>   <renderers>
> >>>>     <renderer mime="application/pdf">
> >>>>       <fonts>
> >>>>
> >>>> <font   embed-url="file:///Users/sjp/Triboni8090/ginkgo/fopFonts/FreeSans.ttf">
> >>>>           <font-triplet name="FreeSans" style="normal" weight="normal"/>
> >>>>         </font>
> >>>>
> >>>>       </fonts>
> >>>>     <renderer>
> >>>>    </renderers>
> >>>> </fop>
> >>>> I think you missed the actual filename in the declaration.
> >>>> Greek works after 0.94 version though.
> >>>> No Greek with 0.20!
> >>>>
> >>>> Spyros Papantoniou, PhD
> >>>> SIP Ltd
> >>>> Software Integration & Processes
> >>>> Ag. Konstantinou 40
> >>>> GR-15124 Marousi
> >>>> Tel: +30 210 6178270
> >>>>
> >>>>
> >>>> On 29 Αυγ 2010, at 7:35 μ.μ., Nikolaos Paraschou wrote:
> >>>>
> >>>> Hello,
> >>>>
> >>>> This is the first time I am using Apache FOP. I started with the quick
> >>>> start guide and the Hello World example which worked just fine (with
> >>>> Latin characters). I decided to replace "Frank" with a name in Greek
> >>>> characters, lets say "Νίκος".
> >>>>
> >>>> I copied "fop.xonf" to "userconfig.xml" and edited the <fonts> tag to
> >>>> look like this:
> >>>>
> >>>> <fonts>
> >>>>         <!-- register all the fonts found in a directory -->
> >>>>         <directory>C:\Users\nikos\MyFonts</directory>
> >>>> </fonts>
> >>>>
> >>>> Then I copied arial.ttf from C:\Windows\Fonts to
> >>>> C:\Users\nikos\MyFonts. I opened arial.ttf with the Windows program
> >>>> Character Map to inspect it and make sure it contains Greek glyphs. It
> >>>> does contain Greek glyphs.
> >>>>
> >>>> When I ran the command:
> >>>>
> >>>> fop -c userconfig.xml -xml name.xml -xsl name2fo.xsl -pdf name.pdf
> >>>>
> >>>> I got back the following severe exception:
> >>>>
> >>>> C:\Users\nikos\Desktop>fop -c myconfig.xml -xml name.xml -xsl name2fo.xsl
> >>>> -pdf n
> >>>> ame.pdf
> >>>> 29 ┴Ϋή 2010 7:17:22 ΉΉ org.apache.fop.apps.FopFactoryConfigurator configure
> >>>> INFO: Default page-height set to: 11in
> >>>> 29 ┴Ϋή 2010 7:17:22 ΉΉ org.apache.fop.apps.FopFactoryConfigurator configure
> >>>> INFO: Default page-width set to: 8.26in
> >>>> 29 ┴Ϋή 2010 7:17:22 ΉΉ org.apache.fop.cli.Main startFOP
> >>>> SEVERE: Exception
> >>>> javax.xml.transform.TransformerException: Invalid byte 2 of 2-byte UTF-8
> >>>> sequenc
> >>>> e.
> >>>>        at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:302)
> >>>>        at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:130)
> >>>>        at org.apache.fop.cli.Main.startFOP(Main.java:174)
> >>>>        at org.apache.fop.cli.Main.main(Main.java:205)
> >>>> Caused by: javax.xml.transform.TransformerException: Invalid byte 2 of
> >>>> 2-byte UT
> >>>> F-8 sequence.
> >>>>        at
> >>>> org.apache.xalan.transformer.TransformerImpl.fatalError(TransformerIm
> >>>> pl.java:780)
> >>>>        at
> >>>> org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
> >>>> l.java:756)
> >>>>        at
> >>>> org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
> >>>> l.java:1284)
> >>>>        at
> >>>> org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
> >>>> l.java:1262)
> >>>>        at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:299)
> >>>>        ... 3 more
> >>>>
> >>>> ---------
> >>>>
> >>>> ; SystemID: file:/C:/Users/nikos/Desktop/name.xml; Line#: 1; Column#: 7
> >>>> javax.xml.transform.TransformerException: Invalid byte 2 of 2-byte UTF-8
> >>>> sequenc
> >>>> e.
> >>>>        at
> >>>> org.apache.xalan.transformer.TransformerImpl.fatalError(TransformerIm
> >>>> pl.java:780)
> >>>>        at
> >>>> org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
> >>>> l.java:756)
> >>>>        at
> >>>> org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
> >>>> l.java:1284)
> >>>>        at
> >>>> org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
> >>>> l.java:1262)
> >>>>        at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:299)
> >>>>        at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:130)
> >>>>        at org.apache.fop.cli.Main.startFOP(Main.java:174)
> >>>>        at org.apache.fop.cli.Main.main(Main.java:205)
> >>>>
> >>>>
> >>>> I am using FOP version 1.0 in Windows 7 x64 and java version "1.6.0_21".
> >>>>
> >>>> Thank you,
> >>>> Nikos
> >>>>
> >>>> ---------------------------------------------------------------------
> >>>> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> >>>> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> >>>>
> >>>>
> >>>>
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> >>> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> >>>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> >> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> > For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> 
> 


Re: Greek text in the HelloWorld example causes Severe Exception

Posted by Spyros Papantoniou <sp...@gmail.com>.
How does your xsl look like?
It works for me though...

this is how I call the Arial fonts and it works:

    <fo:static-content flow-name="header-first">
          <fo:block font-size="10pt" font-family="Symbol"   text-align="right" space-after.optimum="13pt" border-after-color="black" border-after-style="solid" border-after-width="0.1pt">
            <fo:table space-after.optimum="4pt">
              <fo:table-column column-width="19cm"/>
              <fo:table-body>
                <fo:table-row>
                  <fo:table-cell>
                    <fo:block font-size="8pt" font-family="Arial"   text-align="right">
                     ΕδφΑ1: Αναφορά Πρωτοκόλλου μεταξύ <xsl:value-of select="$frmDay"/>.<xsl:value-of select="$frmMonth"/>.<xsl:value-of select="$frmYear"/> και <xsl:value-of select="$toDay"/>.<xsl:value-of select="$toMonth"/>.<xsl:value-of select="$toYear"/>
                    </fo:block>
                  </fo:table-cell>
                </fo:table-row>
              </fo:table-body>
            </fo:table>

          </fo:block>
        </fo:static-content>




On 30 Αυγ 2010, at 7:37 μ.μ., Nikolaos Paraschou wrote:

> Unfortunately FOP insists to put a "#" in place of "ί".
> 
> I can confirm that Arial.ttf contains a CMAP entry for all the required characters. I opened Arial.ttf with Character Map (the Windows utility for viewing fonts). There I inserted code "03af" and it showed the character "ί".
> The same applies for FreeSans.ttf.
> 
> myconfig2.xml contains exactly this code:
> 
> <?xml version="1.0" encoding="utf-8"?>
> 
> <fop version="1.0">
>   <renderers>
>     <renderer mime="application/pdf">
>       <fonts>
>         <font embed-url="file:///C:/Users/nikos/MyFonts/arial.ttf">
>           <font-triplet name="arial" style="normal" weight="normal"/>
>         </font>
>       </fonts>
>     </renderer>
>    </renderers>
> </fop>
> 
> Since I explicitly tell FOP to use arial.ttf, why does it not use it? I also tried this on a Mac OS X 10.6 using Arial with no success. I get the same warning telling iotatonos couldn't be found in font 'Symbol'.
> 
> Maybe I am doing something else wrong?
> 
> Nikos
> 
> 
> 
> 2010/8/30 Spyros Papantoniou <sp...@gmail.com>
> Dont use Symbol!
> Its a mess it has only the 24 Greek letters not accents, not dialysis...
> 
> Find a font that has full UTF-8 glyph set in Greek,
> like on the Mac Arial, Times New Roman, Helvetica all have it.
> I dont have Windoze to check which fonts have the full glyph set.
> 
> FreeSans I discovered is no good either, nor DINRg
> 
> Spyros
> 
> 
> 
> On 30 Αυγ 2010, at 1:04 π.μ., Nikolaos Paraschou wrote:
> 
> > We made some progress I think. I converted "name.xml", "name2fo.xsl"
> > and "myconfig2.xml" from ANSI to UTF-8 (all three files begin with
> > <?xml version="1.0" encoding="UTF-8"?> ) and then ran the command:
> >
> > fop -c myconfig2.xml -xml name.xml -xsl name2fo.xsl -pdf name.pdf
> >
> > which produced the following output:
> >
> > C:\Users\nikos\Desktop>fop -c myconfig2.xml -xml name.xml -xsl name2fo.xsl -pdf
> > name.pdf
> > 30 +Ϋή 2010 12:37:38 ΏΉ org.apache.fop.events.LoggingEventListener processEvent
> > WARNING: Glyph "-" (0x3af, iotatonos) not available in font "Symbol".
> >
> > The word inside "name.xml" is "Νίκος". After the conversion the pdf
> > displays "Hello, Ν#κος!" (with the name aligned a bit lower than
> > Hello,). Obviously, FOP isn't looking for iotatonos inside Arial.ttf
> > or Freesans.ttf (I've tried it with both fonts), but instead it is
> > trying to find iotatonos inside font "Symbol". Why is this happening?
> >
> > I opened Arial.ttf and FreeSans.ttf with Character Map. The
> > description these two fonts have for the character " ί " is:
> >
> > "U+03AF: Greek Small Letter Iota With Tonos"
> >
> > So, FOP is looking for " ί " in Arial and FreeSans as "iotatonos" but
> > it's not there with that descritpion. Maybe that's why it's looking in
> > font "Symbol" later on (correct me if I am wrong). How could this
> > problem be solved?
> >
> > Thank you again,
> > Nikos
> >
> >
> > 2010/8/30 Spyros Papantoniou <sp...@gmail.com>:
> >> The "Invalid byte 2 of 2-byte UTF-8 se" points to not proper UTF encoding somewhere.
> >> I tested FOP 0.95 and it works with Greek!
> >> Do not use FreeSans, as it does include Greek glyphs [I found out the hard way..]
> >> I use Arial.ttf on the Mac with success.
> >>
> >>
> >> Are all your files UTF8 and their header UTF-8?  like:
> >>
> >>  <?xml version="1.0" encoding="UTF-8"?>
> >>
> >> Spyros Papantoniou, PhD
> >>
> >>
> >>
> >>
> >>
> >>
> >> On 30 Αυγ 2010, at 12:10 π.μ., Nikolaos Paraschou wrote:
> >>
> >>> First of all, thank you for your reply Spyros.
> >>>
> >>> I created myconfig2.xml with exactly the following code:
> >>>
> >>> <fop version="1.0">
> >>>  <renderers>
> >>>    <renderer mime="application/pdf">
> >>>      <fonts>
> >>>        <font   embed-url="file:///Users/nikos/MyFonts/FreeSans.ttf">
> >>>          <font-triplet name="FreeSans" style="normal" weight="normal"/>
> >>>        </font>
> >>>      </fonts>
> >>>    </renderer>
> >>>   </renderers>
> >>> </fop>
> >>>
> >>> and then I run the command:
> >>>
> >>> fop -c myconfig2.xml -xml name.xml -xsl name2fo.xsl -pdf name.pdf
> >>>
> >>> which produced again a severe exception:
> >>>
> >>> C:\Users\nikos\Desktop>fop -c myconfig2.xml -xml name.xml -xsl name2fo.xsl -pdf
> >>> name.pdf
> >>> 29 +Ϋή 2010 11:57:59 ΉΉ org.apache.fop.cli.Main startFOP
> >>> SEVERE: Exception
> >>> javax.xml.transform.TransformerException: Invalid byte 2 of 2-byte UTF-8 sequenc
> >>> e.
> >>>        at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:302)
> >>>        at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:130)
> >>>        at org.apache.fop.cli.Main.startFOP(Main.java:174)
> >>>        at org.apache.fop.cli.Main.main(Main.java:205)
> >>> Caused by: javax.xml.transform.TransformerException: Invalid byte 2 of 2-byte UT
> >>> F-8 sequence.
> >>>        at org.apache.xalan.transformer.TransformerImpl.fatalError(TransformerIm
> >>> pl.java:780)
> >>>        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
> >>> l.java:756)
> >>>        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
> >>> l.java:1284)
> >>>        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
> >>> l.java:1262)
> >>>        at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:299)
> >>>        ... 3 more
> >>>
> >>> ---------
> >>>
> >>> ; SystemID: file:/C:/Users/nikos/Desktop/name.xml; Line#: 1; Column#: 7
> >>> javax.xml.transform.TransformerException: Invalid byte 2 of 2-byte UTF-8 sequenc
> >>> e.
> >>>        at org.apache.xalan.transformer.TransformerImpl.fatalError(TransformerIm
> >>> pl.java:780)
> >>>        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
> >>> l.java:756)
> >>>        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
> >>> l.java:1284)
> >>>        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
> >>> l.java:1262)
> >>>        at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:299)
> >>>        at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:130)
> >>>        at org.apache.fop.cli.Main.startFOP(Main.java:174)
> >>>        at org.apache.fop.cli.Main.main(Main.java:205)
> >>>
> >>>
> >>> Obviously I am missing something here. Any idea what might that be?
> >>>
> >>> Thank you,
> >>> Nikos
> >>>
> >>>
> >>>
> >>>
> >>> 2010/8/29 Spyros Papantoniou <sp...@gmail.com>:
> >>>> Better use something like:
> >>>> <fop version="1.0">
> >>>>   <renderers>
> >>>>     <renderer mime="application/pdf">
> >>>>       <fonts>
> >>>>
> >>>> <font   embed-url="file:///Users/sjp/Triboni8090/ginkgo/fopFonts/FreeSans.ttf">
> >>>>           <font-triplet name="FreeSans" style="normal" weight="normal"/>
> >>>>         </font>
> >>>>
> >>>>       </fonts>
> >>>>     <renderer>
> >>>>    </renderers>
> >>>> </fop>
> >>>> I think you missed the actual filename in the declaration.
> >>>> Greek works after 0.94 version though.
> >>>> No Greek with 0.20!
> >>>>
> >>>> Spyros Papantoniou, PhD
> >>>> SIP Ltd
> >>>> Software Integration & Processes
> >>>> Ag. Konstantinou 40
> >>>> GR-15124 Marousi
> >>>> Tel: +30 210 6178270
> >>>>
> >>>>
> >>>> On 29 Αυγ 2010, at 7:35 μ.μ., Nikolaos Paraschou wrote:
> >>>>
> >>>> Hello,
> >>>>
> >>>> This is the first time I am using Apache FOP. I started with the quick
> >>>> start guide and the Hello World example which worked just fine (with
> >>>> Latin characters). I decided to replace "Frank" with a name in Greek
> >>>> characters, lets say "Νίκος".
> >>>>
> >>>> I copied "fop.xonf" to "userconfig.xml" and edited the <fonts> tag to
> >>>> look like this:
> >>>>
> >>>> <fonts>
> >>>>         <!-- register all the fonts found in a directory -->
> >>>>         <directory>C:\Users\nikos\MyFonts</directory>
> >>>> </fonts>
> >>>>
> >>>> Then I copied arial.ttf from C:\Windows\Fonts to
> >>>> C:\Users\nikos\MyFonts. I opened arial.ttf with the Windows program
> >>>> Character Map to inspect it and make sure it contains Greek glyphs. It
> >>>> does contain Greek glyphs.
> >>>>
> >>>> When I ran the command:
> >>>>
> >>>> fop -c userconfig.xml -xml name.xml -xsl name2fo.xsl -pdf name.pdf
> >>>>
> >>>> I got back the following severe exception:
> >>>>
> >>>> C:\Users\nikos\Desktop>fop -c myconfig.xml -xml name.xml -xsl name2fo.xsl
> >>>> -pdf n
> >>>> ame.pdf
> >>>> 29 ┴Ϋή 2010 7:17:22 ΉΉ org.apache.fop.apps.FopFactoryConfigurator configure
> >>>> INFO: Default page-height set to: 11in
> >>>> 29 ┴Ϋή 2010 7:17:22 ΉΉ org.apache.fop.apps.FopFactoryConfigurator configure
> >>>> INFO: Default page-width set to: 8.26in
> >>>> 29 ┴Ϋή 2010 7:17:22 ΉΉ org.apache.fop.cli.Main startFOP
> >>>> SEVERE: Exception
> >>>> javax.xml.transform.TransformerException: Invalid byte 2 of 2-byte UTF-8
> >>>> sequenc
> >>>> e.
> >>>>        at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:302)
> >>>>        at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:130)
> >>>>        at org.apache.fop.cli.Main.startFOP(Main.java:174)
> >>>>        at org.apache.fop.cli.Main.main(Main.java:205)
> >>>> Caused by: javax.xml.transform.TransformerException: Invalid byte 2 of
> >>>> 2-byte UT
> >>>> F-8 sequence.
> >>>>        at
> >>>> org.apache.xalan.transformer.TransformerImpl.fatalError(TransformerIm
> >>>> pl.java:780)
> >>>>        at
> >>>> org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
> >>>> l.java:756)
> >>>>        at
> >>>> org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
> >>>> l.java:1284)
> >>>>        at
> >>>> org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
> >>>> l.java:1262)
> >>>>        at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:299)
> >>>>        ... 3 more
> >>>>
> >>>> ---------
> >>>>
> >>>> ; SystemID: file:/C:/Users/nikos/Desktop/name.xml; Line#: 1; Column#: 7
> >>>> javax.xml.transform.TransformerException: Invalid byte 2 of 2-byte UTF-8
> >>>> sequenc
> >>>> e.
> >>>>        at
> >>>> org.apache.xalan.transformer.TransformerImpl.fatalError(TransformerIm
> >>>> pl.java:780)
> >>>>        at
> >>>> org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
> >>>> l.java:756)
> >>>>        at
> >>>> org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
> >>>> l.java:1284)
> >>>>        at
> >>>> org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
> >>>> l.java:1262)
> >>>>        at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:299)
> >>>>        at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:130)
> >>>>        at org.apache.fop.cli.Main.startFOP(Main.java:174)
> >>>>        at org.apache.fop.cli.Main.main(Main.java:205)
> >>>>
> >>>>
> >>>> I am using FOP version 1.0 in Windows 7 x64 and java version "1.6.0_21".
> >>>>
> >>>> Thank you,
> >>>> Nikos
> >>>>
> >>>> ---------------------------------------------------------------------
> >>>> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> >>>> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> >>>>
> >>>>
> >>>>
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> >>> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> >>>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> >> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> > For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> 
> 


Re: Greek text in the HelloWorld example causes Severe Exception

Posted by Nikolaos Paraschou <ni...@gmail.com>.
>
> you need an xsl as well...
>
the xml with Nikos does not knwo which font to use:
> my xsl contains explicit calls to the xml:
>

This is exactly the reason it didn't work. Thank you Spyros!

I edited name2fo.xsl. It was:

<fo:block>
            Hello, <xsl:value-of select="name"/>!
</fo:block>

and i changed it to:

<fo:block font-family="arial">
            Hello, <xsl:value-of select="name"/>!
</fo:block>

So the font family must be explicitly defined in the XSLT stylesheet too.

Finally, problem solved.

Glenn, thank you for your reply too.

Regards,
Nikos

Re: Greek text in the HelloWorld example causes Severe Exception

Posted by Spyros Papantoniou <sp...@gmail.com>.
Here is my command that works [fop 0.95!]:

SJPMac2:fop095$> ./fop -xml list.xml -xsl printPDF.xsl -c ./conf095/fop.xconf  -pdf printList.pdf

you need an xsl as well...
the xml with Nikos does not knwo which font to use:
my xsl contains explicit calls to the xml:

...xsl snippet:

<fo:block font-size="12pt" font-family="Arial"   text-align="right" border-after-color="black" border-after-style="solid" border-after-width="0.1pt">
              ΕΚ2: Αναφορά Πρωτοκόλλου μεταξύ  <xsl:value-of select="$frmDay"/>.<xsl:value-of select="$frmMonth"/>.<xsl:value-of select="$frmYear"/> και <xsl:value-of select="$toDay"/>.<xsl:value-of select="$toMonth"/>.<xsl:value-of select="$toYear"/> τέλος
          </fo:block>
...end xsl snippet...

Spyros


On 30 Αυγ 2010, at 7:37 μ.μ., Nikolaos Paraschou wrote:

> Unfortunately FOP insists to put a "#" in place of "ί".
> 
> I can confirm that Arial.ttf contains a CMAP entry for all the required characters. I opened Arial.ttf with Character Map (the Windows utility for viewing fonts). There I inserted code "03af" and it showed the character "ί".
> The same applies for FreeSans.ttf.
> 
> myconfig2.xml contains exactly this code:
> 
> <?xml version="1.0" encoding="utf-8"?>
> 
> <fop version="1.0">
>   <renderers>
>     <renderer mime="application/pdf">
>       <fonts>
>         <font embed-url="file:///C:/Users/nikos/MyFonts/arial.ttf">
>           <font-triplet name="arial" style="normal" weight="normal"/>
>         </font>
>       </fonts>
>     </renderer>
>    </renderers>
> </fop>
> 
> Since I explicitly tell FOP to use arial.ttf, why does it not use it? I also tried this on a Mac OS X 10.6 using Arial with no success. I get the same warning telling iotatonos couldn't be found in font 'Symbol'.
> 
> Maybe I am doing something else wrong?
> 
> Nikos
> 
> 
> 
> 2010/8/30 Spyros Papantoniou <sp...@gmail.com>
> Dont use Symbol!
> Its a mess it has only the 24 Greek letters not accents, not dialysis...
> 
> Find a font that has full UTF-8 glyph set in Greek,
> like on the Mac Arial, Times New Roman, Helvetica all have it.
> I dont have Windoze to check which fonts have the full glyph set.
> 
> FreeSans I discovered is no good either, nor DINRg
> 
> Spyros
> 
> 
> 
> On 30 Αυγ 2010, at 1:04 π.μ., Nikolaos Paraschou wrote:
> 
> > We made some progress I think. I converted "name.xml", "name2fo.xsl"
> > and "myconfig2.xml" from ANSI to UTF-8 (all three files begin with
> > <?xml version="1.0" encoding="UTF-8"?> ) and then ran the command:
> >
> > fop -c myconfig2.xml -xml name.xml -xsl name2fo.xsl -pdf name.pdf
> >
> > which produced the following output:
> >
> > C:\Users\nikos\Desktop>fop -c myconfig2.xml -xml name.xml -xsl name2fo.xsl -pdf
> > name.pdf
> > 30 +Ϋή 2010 12:37:38 ΏΉ org.apache.fop.events.LoggingEventListener processEvent
> > WARNING: Glyph "-" (0x3af, iotatonos) not available in font "Symbol".
> >
> > The word inside "name.xml" is "Νίκος". After the conversion the pdf
> > displays "Hello, Ν#κος!" (with the name aligned a bit lower than
> > Hello,). Obviously, FOP isn't looking for iotatonos inside Arial.ttf
> > or Freesans.ttf (I've tried it with both fonts), but instead it is
> > trying to find iotatonos inside font "Symbol". Why is this happening?
> >
> > I opened Arial.ttf and FreeSans.ttf with Character Map. The
> > description these two fonts have for the character " ί " is:
> >
> > "U+03AF: Greek Small Letter Iota With Tonos"
> >
> > So, FOP is looking for " ί " in Arial and FreeSans as "iotatonos" but
> > it's not there with that descritpion. Maybe that's why it's looking in
> > font "Symbol" later on (correct me if I am wrong). How could this
> > problem be solved?
> >
> > Thank you again,
> > Nikos
> >
> >
> > 2010/8/30 Spyros Papantoniou <sp...@gmail.com>:
> >> The "Invalid byte 2 of 2-byte UTF-8 se" points to not proper UTF encoding somewhere.
> >> I tested FOP 0.95 and it works with Greek!
> >> Do not use FreeSans, as it does include Greek glyphs [I found out the hard way..]
> >> I use Arial.ttf on the Mac with success.
> >>
> >>
> >> Are all your files UTF8 and their header UTF-8?  like:
> >>
> >>  <?xml version="1.0" encoding="UTF-8"?>
> >>
> >> Spyros Papantoniou, PhD
> >>
> >>
> >>
> >>
> >>
> >>
> >> On 30 Αυγ 2010, at 12:10 π.μ., Nikolaos Paraschou wrote:
> >>
> >>> First of all, thank you for your reply Spyros.
> >>>
> >>> I created myconfig2.xml with exactly the following code:
> >>>
> >>> <fop version="1.0">
> >>>  <renderers>
> >>>    <renderer mime="application/pdf">
> >>>      <fonts>
> >>>        <font   embed-url="file:///Users/nikos/MyFonts/FreeSans.ttf">
> >>>          <font-triplet name="FreeSans" style="normal" weight="normal"/>
> >>>        </font>
> >>>      </fonts>
> >>>    </renderer>
> >>>   </renderers>
> >>> </fop>
> >>>
> >>> and then I run the command:
> >>>
> >>> fop -c myconfig2.xml -xml name.xml -xsl name2fo.xsl -pdf name.pdf
> >>>
> >>> which produced again a severe exception:
> >>>
> >>> C:\Users\nikos\Desktop>fop -c myconfig2.xml -xml name.xml -xsl name2fo.xsl -pdf
> >>> name.pdf
> >>> 29 +Ϋή 2010 11:57:59 ΉΉ org.apache.fop.cli.Main startFOP
> >>> SEVERE: Exception
> >>> javax.xml.transform.TransformerException: Invalid byte 2 of 2-byte UTF-8 sequenc
> >>> e.
> >>>        at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:302)
> >>>        at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:130)
> >>>        at org.apache.fop.cli.Main.startFOP(Main.java:174)
> >>>        at org.apache.fop.cli.Main.main(Main.java:205)
> >>> Caused by: javax.xml.transform.TransformerException: Invalid byte 2 of 2-byte UT
> >>> F-8 sequence.
> >>>        at org.apache.xalan.transformer.TransformerImpl.fatalError(TransformerIm
> >>> pl.java:780)
> >>>        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
> >>> l.java:756)
> >>>        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
> >>> l.java:1284)
> >>>        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
> >>> l.java:1262)
> >>>        at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:299)
> >>>        ... 3 more
> >>>
> >>> ---------
> >>>
> >>> ; SystemID: file:/C:/Users/nikos/Desktop/name.xml; Line#: 1; Column#: 7
> >>> javax.xml.transform.TransformerException: Invalid byte 2 of 2-byte UTF-8 sequenc
> >>> e.
> >>>        at org.apache.xalan.transformer.TransformerImpl.fatalError(TransformerIm
> >>> pl.java:780)
> >>>        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
> >>> l.java:756)
> >>>        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
> >>> l.java:1284)
> >>>        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
> >>> l.java:1262)
> >>>        at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:299)
> >>>        at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:130)
> >>>        at org.apache.fop.cli.Main.startFOP(Main.java:174)
> >>>        at org.apache.fop.cli.Main.main(Main.java:205)
> >>>
> >>>
> >>> Obviously I am missing something here. Any idea what might that be?
> >>>
> >>> Thank you,
> >>> Nikos
> >>>
> >>>
> >>>
> >>>
> >>> 2010/8/29 Spyros Papantoniou <sp...@gmail.com>:
> >>>> Better use something like:
> >>>> <fop version="1.0">
> >>>>   <renderers>
> >>>>     <renderer mime="application/pdf">
> >>>>       <fonts>
> >>>>
> >>>> <font   embed-url="file:///Users/sjp/Triboni8090/ginkgo/fopFonts/FreeSans.ttf">
> >>>>           <font-triplet name="FreeSans" style="normal" weight="normal"/>
> >>>>         </font>
> >>>>
> >>>>       </fonts>
> >>>>     <renderer>
> >>>>    </renderers>
> >>>> </fop>
> >>>> I think you missed the actual filename in the declaration.
> >>>> Greek works after 0.94 version though.
> >>>> No Greek with 0.20!
> >>>>
> >>>> Spyros Papantoniou, PhD
> >>>> SIP Ltd
> >>>> Software Integration & Processes
> >>>> Ag. Konstantinou 40
> >>>> GR-15124 Marousi
> >>>> Tel: +30 210 6178270
> >>>>
> >>>>
> >>>> On 29 Αυγ 2010, at 7:35 μ.μ., Nikolaos Paraschou wrote:
> >>>>
> >>>> Hello,
> >>>>
> >>>> This is the first time I am using Apache FOP. I started with the quick
> >>>> start guide and the Hello World example which worked just fine (with
> >>>> Latin characters). I decided to replace "Frank" with a name in Greek
> >>>> characters, lets say "Νίκος".
> >>>>
> >>>> I copied "fop.xonf" to "userconfig.xml" and edited the <fonts> tag to
> >>>> look like this:
> >>>>
> >>>> <fonts>
> >>>>         <!-- register all the fonts found in a directory -->
> >>>>         <directory>C:\Users\nikos\MyFonts</directory>
> >>>> </fonts>
> >>>>
> >>>> Then I copied arial.ttf from C:\Windows\Fonts to
> >>>> C:\Users\nikos\MyFonts. I opened arial.ttf with the Windows program
> >>>> Character Map to inspect it and make sure it contains Greek glyphs. It
> >>>> does contain Greek glyphs.
> >>>>
> >>>> When I ran the command:
> >>>>
> >>>> fop -c userconfig.xml -xml name.xml -xsl name2fo.xsl -pdf name.pdf
> >>>>
> >>>> I got back the following severe exception:
> >>>>
> >>>> C:\Users\nikos\Desktop>fop -c myconfig.xml -xml name.xml -xsl name2fo.xsl
> >>>> -pdf n
> >>>> ame.pdf
> >>>> 29 ┴Ϋή 2010 7:17:22 ΉΉ org.apache.fop.apps.FopFactoryConfigurator configure
> >>>> INFO: Default page-height set to: 11in
> >>>> 29 ┴Ϋή 2010 7:17:22 ΉΉ org.apache.fop.apps.FopFactoryConfigurator configure
> >>>> INFO: Default page-width set to: 8.26in
> >>>> 29 ┴Ϋή 2010 7:17:22 ΉΉ org.apache.fop.cli.Main startFOP
> >>>> SEVERE: Exception
> >>>> javax.xml.transform.TransformerException: Invalid byte 2 of 2-byte UTF-8
> >>>> sequenc
> >>>> e.
> >>>>        at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:302)
> >>>>        at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:130)
> >>>>        at org.apache.fop.cli.Main.startFOP(Main.java:174)
> >>>>        at org.apache.fop.cli.Main.main(Main.java:205)
> >>>> Caused by: javax.xml.transform.TransformerException: Invalid byte 2 of
> >>>> 2-byte UT
> >>>> F-8 sequence.
> >>>>        at
> >>>> org.apache.xalan.transformer.TransformerImpl.fatalError(TransformerIm
> >>>> pl.java:780)
> >>>>        at
> >>>> org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
> >>>> l.java:756)
> >>>>        at
> >>>> org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
> >>>> l.java:1284)
> >>>>        at
> >>>> org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
> >>>> l.java:1262)
> >>>>        at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:299)
> >>>>        ... 3 more
> >>>>
> >>>> ---------
> >>>>
> >>>> ; SystemID: file:/C:/Users/nikos/Desktop/name.xml; Line#: 1; Column#: 7
> >>>> javax.xml.transform.TransformerException: Invalid byte 2 of 2-byte UTF-8
> >>>> sequenc
> >>>> e.
> >>>>        at
> >>>> org.apache.xalan.transformer.TransformerImpl.fatalError(TransformerIm
> >>>> pl.java:780)
> >>>>        at
> >>>> org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
> >>>> l.java:756)
> >>>>        at
> >>>> org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
> >>>> l.java:1284)
> >>>>        at
> >>>> org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
> >>>> l.java:1262)
> >>>>        at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:299)
> >>>>        at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:130)
> >>>>        at org.apache.fop.cli.Main.startFOP(Main.java:174)
> >>>>        at org.apache.fop.cli.Main.main(Main.java:205)
> >>>>
> >>>>
> >>>> I am using FOP version 1.0 in Windows 7 x64 and java version "1.6.0_21".
> >>>>
> >>>> Thank you,
> >>>> Nikos
> >>>>
> >>>> ---------------------------------------------------------------------
> >>>> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> >>>> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> >>>>
> >>>>
> >>>>
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> >>> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> >>>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> >> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> > For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> 
> 


Re: Greek text in the HelloWorld example causes Severe Exception

Posted by Glenn Adams <gl...@skynav.com>.
try the following:

1. rewrite your fop conf file to read as follows:

    ...
    <renderer mime="application/pdf">
      <fonts>
        <auto-detect/>
      </fonts>
    </renderer>
    ...

2. rm ~/.fop/fop-fonts.cache

then rerun to see if you get different behavior;

the two changes above ensure that FOP has access to the system supplied
fonts (via auto-detect), and that the FOP font cache is rebuilt prior to
formatting

regards,
glenn

On Tue, Aug 31, 2010 at 12:37 AM, Nikolaos Paraschou <ni...@gmail.com>wrote:

> Unfortunately FOP insists to put a "#" in place of "ί".
>
> I can confirm that Arial.ttf contains a CMAP entry for all the required
> characters. I opened Arial.ttf with Character Map (the Windows utility for
> viewing fonts). There I inserted code "03af" and it showed the character
> "ί".
> The same applies for FreeSans.ttf.
>
> myconfig2.xml contains exactly this code:
>
> <?xml version="1.0" encoding="utf-8"?>
>
> <fop version="1.0">
>   <renderers>
>     <renderer mime="application/pdf">
>       <fonts>
>         <font embed-url="file:///C:/Users/nikos/MyFonts/arial.ttf">
>           <font-triplet name="arial" style="normal" weight="normal"/>
>         </font>
>       </fonts>
>     </renderer>
>    </renderers>
> </fop>
>
> Since I explicitly tell FOP to use arial.ttf, why does it not use it? I
> also tried this on a Mac OS X 10.6 using Arial with no success. I get the
> same warning telling iotatonos couldn't be found in font 'Symbol'.
>
> Maybe I am doing something else wrong?
>
> Nikos
>
>

Re: Greek text in the HelloWorld example causes Severe Exception

Posted by Nikolaos Paraschou <ni...@gmail.com>.
Unfortunately FOP insists to put a "#" in place of "ί".

I can confirm that Arial.ttf contains a CMAP entry for all the required
characters. I opened Arial.ttf with Character Map (the Windows utility for
viewing fonts). There I inserted code "03af" and it showed the character
"ί".
The same applies for FreeSans.ttf.

myconfig2.xml contains exactly this code:

<?xml version="1.0" encoding="utf-8"?>

<fop version="1.0">
  <renderers>
    <renderer mime="application/pdf">
      <fonts>
        <font embed-url="file:///C:/Users/nikos/MyFonts/arial.ttf">
          <font-triplet name="arial" style="normal" weight="normal"/>
        </font>
      </fonts>
    </renderer>
   </renderers>
</fop>

Since I explicitly tell FOP to use arial.ttf, why does it not use it? I also
tried this on a Mac OS X 10.6 using Arial with no success. I get the same
warning telling iotatonos couldn't be found in font 'Symbol'.

Maybe I am doing something else wrong?

Nikos



2010/8/30 Spyros Papantoniou <sp...@gmail.com>

> Dont use Symbol!
> Its a mess it has only the 24 Greek letters not accents, not dialysis...
>
> Find a font that has full UTF-8 glyph set in Greek,
> like on the Mac Arial, Times New Roman, Helvetica all have it.
> I dont have Windoze to check which fonts have the full glyph set.
>
> FreeSans I discovered is no good either, nor DINRg
>
> Spyros
>
>
>
> On 30 Αυγ 2010, at 1:04 π.μ., Nikolaos Paraschou wrote:
>
> > We made some progress I think. I converted "name.xml", "name2fo.xsl"
> > and "myconfig2.xml" from ANSI to UTF-8 (all three files begin with
> > <?xml version="1.0" encoding="UTF-8"?> ) and then ran the command:
> >
> > fop -c myconfig2.xml -xml name.xml -xsl name2fo.xsl -pdf name.pdf
> >
> > which produced the following output:
> >
> > C:\Users\nikos\Desktop>fop -c myconfig2.xml -xml name.xml -xsl
> name2fo.xsl -pdf
> > name.pdf
> > 30 +Ϋή 2010 12:37:38 ΏΉ org.apache.fop.events.LoggingEventListener
> processEvent
> > WARNING: Glyph "-" (0x3af, iotatonos) not available in font "Symbol".
> >
> > The word inside "name.xml" is "Νίκος". After the conversion the pdf
> > displays "Hello, Ν#κος!" (with the name aligned a bit lower than
> > Hello,). Obviously, FOP isn't looking for iotatonos inside Arial.ttf
> > or Freesans.ttf (I've tried it with both fonts), but instead it is
> > trying to find iotatonos inside font "Symbol". Why is this happening?
> >
> > I opened Arial.ttf and FreeSans.ttf with Character Map. The
> > description these two fonts have for the character " ί " is:
> >
> > "U+03AF: Greek Small Letter Iota With Tonos"
> >
> > So, FOP is looking for " ί " in Arial and FreeSans as "iotatonos" but
> > it's not there with that descritpion. Maybe that's why it's looking in
> > font "Symbol" later on (correct me if I am wrong). How could this
> > problem be solved?
> >
> > Thank you again,
> > Nikos
> >
> >
> > 2010/8/30 Spyros Papantoniou <sp...@gmail.com>:
> >> The "Invalid byte 2 of 2-byte UTF-8 se" points to not proper UTF
> encoding somewhere.
> >> I tested FOP 0.95 and it works with Greek!
> >> Do not use FreeSans, as it does include Greek glyphs [I found out the
> hard way..]
> >> I use Arial.ttf on the Mac with success.
> >>
> >>
> >> Are all your files UTF8 and their header UTF-8?  like:
> >>
> >>  <?xml version="1.0" encoding="UTF-8"?>
> >>
> >> Spyros Papantoniou, PhD
> >>
> >>
> >>
> >>
> >>
> >>
> >> On 30 Αυγ 2010, at 12:10 π.μ., Nikolaos Paraschou wrote:
> >>
> >>> First of all, thank you for your reply Spyros.
> >>>
> >>> I created myconfig2.xml with exactly the following code:
> >>>
> >>> <fop version="1.0">
> >>>  <renderers>
> >>>    <renderer mime="application/pdf">
> >>>      <fonts>
> >>>        <font   embed-url="file:///Users/nikos/MyFonts/FreeSans.ttf">
> >>>          <font-triplet name="FreeSans" style="normal" weight="normal"/>
> >>>        </font>
> >>>      </fonts>
> >>>    </renderer>
> >>>   </renderers>
> >>> </fop>
> >>>
> >>> and then I run the command:
> >>>
> >>> fop -c myconfig2.xml -xml name.xml -xsl name2fo.xsl -pdf name.pdf
> >>>
> >>> which produced again a severe exception:
> >>>
> >>> C:\Users\nikos\Desktop>fop -c myconfig2.xml -xml name.xml -xsl
> name2fo.xsl -pdf
> >>> name.pdf
> >>> 29 +Ϋή 2010 11:57:59 ΉΉ org.apache.fop.cli.Main startFOP
> >>> SEVERE: Exception
> >>> javax.xml.transform.TransformerException: Invalid byte 2 of 2-byte
> UTF-8 sequenc
> >>> e.
> >>>        at
> org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:302)
> >>>        at
> org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:130)
> >>>        at org.apache.fop.cli.Main.startFOP(Main.java:174)
> >>>        at org.apache.fop.cli.Main.main(Main.java:205)
> >>> Caused by: javax.xml.transform.TransformerException: Invalid byte 2 of
> 2-byte UT
> >>> F-8 sequence.
> >>>        at
> org.apache.xalan.transformer.TransformerImpl.fatalError(TransformerIm
> >>> pl.java:780)
> >>>        at
> org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
> >>> l.java:756)
> >>>        at
> org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
> >>> l.java:1284)
> >>>        at
> org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
> >>> l.java:1262)
> >>>        at
> org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:299)
> >>>        ... 3 more
> >>>
> >>> ---------
> >>>
> >>> ; SystemID: file:/C:/Users/nikos/Desktop/name.xml; Line#: 1; Column#: 7
> >>> javax.xml.transform.TransformerException: Invalid byte 2 of 2-byte
> UTF-8 sequenc
> >>> e.
> >>>        at
> org.apache.xalan.transformer.TransformerImpl.fatalError(TransformerIm
> >>> pl.java:780)
> >>>        at
> org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
> >>> l.java:756)
> >>>        at
> org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
> >>> l.java:1284)
> >>>        at
> org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
> >>> l.java:1262)
> >>>        at
> org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:299)
> >>>        at
> org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:130)
> >>>        at org.apache.fop.cli.Main.startFOP(Main.java:174)
> >>>        at org.apache.fop.cli.Main.main(Main.java:205)
> >>>
> >>>
> >>> Obviously I am missing something here. Any idea what might that be?
> >>>
> >>> Thank you,
> >>> Nikos
> >>>
> >>>
> >>>
> >>>
> >>> 2010/8/29 Spyros Papantoniou <sp...@gmail.com>:
> >>>> Better use something like:
> >>>> <fop version="1.0">
> >>>>   <renderers>
> >>>>     <renderer mime="application/pdf">
> >>>>       <fonts>
> >>>>
> >>>> <font
> embed-url="file:///Users/sjp/Triboni8090/ginkgo/fopFonts/FreeSans.ttf">
> >>>>           <font-triplet name="FreeSans" style="normal"
> weight="normal"/>
> >>>>         </font>
> >>>>
> >>>>       </fonts>
> >>>>     <renderer>
> >>>>    </renderers>
> >>>> </fop>
> >>>> I think you missed the actual filename in the declaration.
> >>>> Greek works after 0.94 version though.
> >>>> No Greek with 0.20!
> >>>>
> >>>> Spyros Papantoniou, PhD
> >>>> SIP Ltd
> >>>> Software Integration & Processes
> >>>> Ag. Konstantinou 40
> >>>> GR-15124 Marousi
> >>>> Tel: +30 210 6178270
> >>>>
> >>>>
> >>>> On 29 Αυγ 2010, at 7:35 μ.μ., Nikolaos Paraschou wrote:
> >>>>
> >>>> Hello,
> >>>>
> >>>> This is the first time I am using Apache FOP. I started with the quick
> >>>> start guide and the Hello World example which worked just fine (with
> >>>> Latin characters). I decided to replace "Frank" with a name in Greek
> >>>> characters, lets say "Νίκος".
> >>>>
> >>>> I copied "fop.xonf" to "userconfig.xml" and edited the <fonts> tag to
> >>>> look like this:
> >>>>
> >>>> <fonts>
> >>>>         <!-- register all the fonts found in a directory -->
> >>>>         <directory>C:\Users\nikos\MyFonts</directory>
> >>>> </fonts>
> >>>>
> >>>> Then I copied arial.ttf from C:\Windows\Fonts to
> >>>> C:\Users\nikos\MyFonts. I opened arial.ttf with the Windows program
> >>>> Character Map to inspect it and make sure it contains Greek glyphs. It
> >>>> does contain Greek glyphs.
> >>>>
> >>>> When I ran the command:
> >>>>
> >>>> fop -c userconfig.xml -xml name.xml -xsl name2fo.xsl -pdf name.pdf
> >>>>
> >>>> I got back the following severe exception:
> >>>>
> >>>> C:\Users\nikos\Desktop>fop -c myconfig.xml -xml name.xml -xsl
> name2fo.xsl
> >>>> -pdf n
> >>>> ame.pdf
> >>>> 29 ┴Ϋή 2010 7:17:22 ΉΉ org.apache.fop.apps.FopFactoryConfigurator
> configure
> >>>> INFO: Default page-height set to: 11in
> >>>> 29 ┴Ϋή 2010 7:17:22 ΉΉ org.apache.fop.apps.FopFactoryConfigurator
> configure
> >>>> INFO: Default page-width set to: 8.26in
> >>>> 29 ┴Ϋή 2010 7:17:22 ΉΉ org.apache.fop.cli.Main startFOP
> >>>> SEVERE: Exception
> >>>> javax.xml.transform.TransformerException: Invalid byte 2 of 2-byte
> UTF-8
> >>>> sequenc
> >>>> e.
> >>>>        at
> org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:302)
> >>>>        at
> org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:130)
> >>>>        at org.apache.fop.cli.Main.startFOP(Main.java:174)
> >>>>        at org.apache.fop.cli.Main.main(Main.java:205)
> >>>> Caused by: javax.xml.transform.TransformerException: Invalid byte 2 of
> >>>> 2-byte UT
> >>>> F-8 sequence.
> >>>>        at
> >>>> org.apache.xalan.transformer.TransformerImpl.fatalError(TransformerIm
> >>>> pl.java:780)
> >>>>        at
> >>>> org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
> >>>> l.java:756)
> >>>>        at
> >>>> org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
> >>>> l.java:1284)
> >>>>        at
> >>>> org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
> >>>> l.java:1262)
> >>>>        at
> org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:299)
> >>>>        ... 3 more
> >>>>
> >>>> ---------
> >>>>
> >>>> ; SystemID: file:/C:/Users/nikos/Desktop/name.xml; Line#: 1; Column#:
> 7
> >>>> javax.xml.transform.TransformerException: Invalid byte 2 of 2-byte
> UTF-8
> >>>> sequenc
> >>>> e.
> >>>>        at
> >>>> org.apache.xalan.transformer.TransformerImpl.fatalError(TransformerIm
> >>>> pl.java:780)
> >>>>        at
> >>>> org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
> >>>> l.java:756)
> >>>>        at
> >>>> org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
> >>>> l.java:1284)
> >>>>        at
> >>>> org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
> >>>> l.java:1262)
> >>>>        at
> org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:299)
> >>>>        at
> org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:130)
> >>>>        at org.apache.fop.cli.Main.startFOP(Main.java:174)
> >>>>        at org.apache.fop.cli.Main.main(Main.java:205)
> >>>>
> >>>>
> >>>> I am using FOP version 1.0 in Windows 7 x64 and java version
> "1.6.0_21".
> >>>>
> >>>> Thank you,
> >>>> Nikos
> >>>>
> >>>> ---------------------------------------------------------------------
> >>>> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> >>>> For additional commands, e-mail:
> fop-users-help@xmlgraphics.apache.org
> >>>>
> >>>>
> >>>>
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> >>> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> >>>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> >> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> > For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>

Re: Greek text in the HelloWorld example causes Severe Exception

Posted by Spyros Papantoniou <sp...@gmail.com>.
Dont use Symbol!
Its a mess it has only the 24 Greek letters not accents, not dialysis...

Find a font that has full UTF-8 glyph set in Greek, 
like on the Mac Arial, Times New Roman, Helvetica all have it.
I dont have Windoze to check which fonts have the full glyph set.

FreeSans I discovered is no good either, nor DINRg

Spyros 



On 30 Αυγ 2010, at 1:04 π.μ., Nikolaos Paraschou wrote:

> We made some progress I think. I converted "name.xml", "name2fo.xsl"
> and "myconfig2.xml" from ANSI to UTF-8 (all three files begin with
> <?xml version="1.0" encoding="UTF-8"?> ) and then ran the command:
> 
> fop -c myconfig2.xml -xml name.xml -xsl name2fo.xsl -pdf name.pdf
> 
> which produced the following output:
> 
> C:\Users\nikos\Desktop>fop -c myconfig2.xml -xml name.xml -xsl name2fo.xsl -pdf
> name.pdf
> 30 +Ϋή 2010 12:37:38 ΏΉ org.apache.fop.events.LoggingEventListener processEvent
> WARNING: Glyph "-" (0x3af, iotatonos) not available in font "Symbol".
> 
> The word inside "name.xml" is "Νίκος". After the conversion the pdf
> displays "Hello, Ν#κος!" (with the name aligned a bit lower than
> Hello,). Obviously, FOP isn't looking for iotatonos inside Arial.ttf
> or Freesans.ttf (I've tried it with both fonts), but instead it is
> trying to find iotatonos inside font "Symbol". Why is this happening?
> 
> I opened Arial.ttf and FreeSans.ttf with Character Map. The
> description these two fonts have for the character " ί " is:
> 
> "U+03AF: Greek Small Letter Iota With Tonos"
> 
> So, FOP is looking for " ί " in Arial and FreeSans as "iotatonos" but
> it's not there with that descritpion. Maybe that's why it's looking in
> font "Symbol" later on (correct me if I am wrong). How could this
> problem be solved?
> 
> Thank you again,
> Nikos
> 
> 
> 2010/8/30 Spyros Papantoniou <sp...@gmail.com>:
>> The "Invalid byte 2 of 2-byte UTF-8 se" points to not proper UTF encoding somewhere.
>> I tested FOP 0.95 and it works with Greek!
>> Do not use FreeSans, as it does include Greek glyphs [I found out the hard way..]
>> I use Arial.ttf on the Mac with success.
>> 
>> 
>> Are all your files UTF8 and their header UTF-8?  like:
>> 
>>  <?xml version="1.0" encoding="UTF-8"?>
>> 
>> Spyros Papantoniou, PhD
>> 
>> 
>> 
>> 
>> 
>> 
>> On 30 Αυγ 2010, at 12:10 π.μ., Nikolaos Paraschou wrote:
>> 
>>> First of all, thank you for your reply Spyros.
>>> 
>>> I created myconfig2.xml with exactly the following code:
>>> 
>>> <fop version="1.0">
>>>  <renderers>
>>>    <renderer mime="application/pdf">
>>>      <fonts>
>>>        <font   embed-url="file:///Users/nikos/MyFonts/FreeSans.ttf">
>>>          <font-triplet name="FreeSans" style="normal" weight="normal"/>
>>>        </font>
>>>      </fonts>
>>>    </renderer>
>>>   </renderers>
>>> </fop>
>>> 
>>> and then I run the command:
>>> 
>>> fop -c myconfig2.xml -xml name.xml -xsl name2fo.xsl -pdf name.pdf
>>> 
>>> which produced again a severe exception:
>>> 
>>> C:\Users\nikos\Desktop>fop -c myconfig2.xml -xml name.xml -xsl name2fo.xsl -pdf
>>> name.pdf
>>> 29 +Ϋή 2010 11:57:59 ΉΉ org.apache.fop.cli.Main startFOP
>>> SEVERE: Exception
>>> javax.xml.transform.TransformerException: Invalid byte 2 of 2-byte UTF-8 sequenc
>>> e.
>>>        at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:302)
>>>        at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:130)
>>>        at org.apache.fop.cli.Main.startFOP(Main.java:174)
>>>        at org.apache.fop.cli.Main.main(Main.java:205)
>>> Caused by: javax.xml.transform.TransformerException: Invalid byte 2 of 2-byte UT
>>> F-8 sequence.
>>>        at org.apache.xalan.transformer.TransformerImpl.fatalError(TransformerIm
>>> pl.java:780)
>>>        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
>>> l.java:756)
>>>        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
>>> l.java:1284)
>>>        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
>>> l.java:1262)
>>>        at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:299)
>>>        ... 3 more
>>> 
>>> ---------
>>> 
>>> ; SystemID: file:/C:/Users/nikos/Desktop/name.xml; Line#: 1; Column#: 7
>>> javax.xml.transform.TransformerException: Invalid byte 2 of 2-byte UTF-8 sequenc
>>> e.
>>>        at org.apache.xalan.transformer.TransformerImpl.fatalError(TransformerIm
>>> pl.java:780)
>>>        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
>>> l.java:756)
>>>        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
>>> l.java:1284)
>>>        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
>>> l.java:1262)
>>>        at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:299)
>>>        at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:130)
>>>        at org.apache.fop.cli.Main.startFOP(Main.java:174)
>>>        at org.apache.fop.cli.Main.main(Main.java:205)
>>> 
>>> 
>>> Obviously I am missing something here. Any idea what might that be?
>>> 
>>> Thank you,
>>> Nikos
>>> 
>>> 
>>> 
>>> 
>>> 2010/8/29 Spyros Papantoniou <sp...@gmail.com>:
>>>> Better use something like:
>>>> <fop version="1.0">
>>>>   <renderers>
>>>>     <renderer mime="application/pdf">
>>>>       <fonts>
>>>> 
>>>> <font   embed-url="file:///Users/sjp/Triboni8090/ginkgo/fopFonts/FreeSans.ttf">
>>>>           <font-triplet name="FreeSans" style="normal" weight="normal"/>
>>>>         </font>
>>>> 
>>>>       </fonts>
>>>>     <renderer>
>>>>    </renderers>
>>>> </fop>
>>>> I think you missed the actual filename in the declaration.
>>>> Greek works after 0.94 version though.
>>>> No Greek with 0.20!
>>>> 
>>>> Spyros Papantoniou, PhD
>>>> SIP Ltd
>>>> Software Integration & Processes
>>>> Ag. Konstantinou 40
>>>> GR-15124 Marousi
>>>> Tel: +30 210 6178270
>>>> 
>>>> 
>>>> On 29 Αυγ 2010, at 7:35 μ.μ., Nikolaos Paraschou wrote:
>>>> 
>>>> Hello,
>>>> 
>>>> This is the first time I am using Apache FOP. I started with the quick
>>>> start guide and the Hello World example which worked just fine (with
>>>> Latin characters). I decided to replace "Frank" with a name in Greek
>>>> characters, lets say "Νίκος".
>>>> 
>>>> I copied "fop.xonf" to "userconfig.xml" and edited the <fonts> tag to
>>>> look like this:
>>>> 
>>>> <fonts>
>>>>         <!-- register all the fonts found in a directory -->
>>>>         <directory>C:\Users\nikos\MyFonts</directory>
>>>> </fonts>
>>>> 
>>>> Then I copied arial.ttf from C:\Windows\Fonts to
>>>> C:\Users\nikos\MyFonts. I opened arial.ttf with the Windows program
>>>> Character Map to inspect it and make sure it contains Greek glyphs. It
>>>> does contain Greek glyphs.
>>>> 
>>>> When I ran the command:
>>>> 
>>>> fop -c userconfig.xml -xml name.xml -xsl name2fo.xsl -pdf name.pdf
>>>> 
>>>> I got back the following severe exception:
>>>> 
>>>> C:\Users\nikos\Desktop>fop -c myconfig.xml -xml name.xml -xsl name2fo.xsl
>>>> -pdf n
>>>> ame.pdf
>>>> 29 ┴Ϋή 2010 7:17:22 ΉΉ org.apache.fop.apps.FopFactoryConfigurator configure
>>>> INFO: Default page-height set to: 11in
>>>> 29 ┴Ϋή 2010 7:17:22 ΉΉ org.apache.fop.apps.FopFactoryConfigurator configure
>>>> INFO: Default page-width set to: 8.26in
>>>> 29 ┴Ϋή 2010 7:17:22 ΉΉ org.apache.fop.cli.Main startFOP
>>>> SEVERE: Exception
>>>> javax.xml.transform.TransformerException: Invalid byte 2 of 2-byte UTF-8
>>>> sequenc
>>>> e.
>>>>        at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:302)
>>>>        at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:130)
>>>>        at org.apache.fop.cli.Main.startFOP(Main.java:174)
>>>>        at org.apache.fop.cli.Main.main(Main.java:205)
>>>> Caused by: javax.xml.transform.TransformerException: Invalid byte 2 of
>>>> 2-byte UT
>>>> F-8 sequence.
>>>>        at
>>>> org.apache.xalan.transformer.TransformerImpl.fatalError(TransformerIm
>>>> pl.java:780)
>>>>        at
>>>> org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
>>>> l.java:756)
>>>>        at
>>>> org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
>>>> l.java:1284)
>>>>        at
>>>> org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
>>>> l.java:1262)
>>>>        at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:299)
>>>>        ... 3 more
>>>> 
>>>> ---------
>>>> 
>>>> ; SystemID: file:/C:/Users/nikos/Desktop/name.xml; Line#: 1; Column#: 7
>>>> javax.xml.transform.TransformerException: Invalid byte 2 of 2-byte UTF-8
>>>> sequenc
>>>> e.
>>>>        at
>>>> org.apache.xalan.transformer.TransformerImpl.fatalError(TransformerIm
>>>> pl.java:780)
>>>>        at
>>>> org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
>>>> l.java:756)
>>>>        at
>>>> org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
>>>> l.java:1284)
>>>>        at
>>>> org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
>>>> l.java:1262)
>>>>        at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:299)
>>>>        at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:130)
>>>>        at org.apache.fop.cli.Main.startFOP(Main.java:174)
>>>>        at org.apache.fop.cli.Main.main(Main.java:205)
>>>> 
>>>> 
>>>> I am using FOP version 1.0 in Windows 7 x64 and java version "1.6.0_21".
>>>> 
>>>> Thank you,
>>>> Nikos
>>>> 
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
>>>> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>>>> 
>>>> 
>>>> 
>>> 
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
>>> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>>> 
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
>> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>> 
>> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Greek text in the HelloWorld example causes Severe Exception

Posted by Nikolaos Paraschou <ni...@gmail.com>.
We made some progress I think. I converted "name.xml", "name2fo.xsl"
and "myconfig2.xml" from ANSI to UTF-8 (all three files begin with
<?xml version="1.0" encoding="UTF-8"?> ) and then ran the command:

fop -c myconfig2.xml -xml name.xml -xsl name2fo.xsl -pdf name.pdf

which produced the following output:

C:\Users\nikos\Desktop>fop -c myconfig2.xml -xml name.xml -xsl name2fo.xsl -pdf
name.pdf
30 +Ϋή 2010 12:37:38 ΏΉ org.apache.fop.events.LoggingEventListener processEvent
WARNING: Glyph "-" (0x3af, iotatonos) not available in font "Symbol".

The word inside "name.xml" is "Νίκος". After the conversion the pdf
displays "Hello, Ν#κος!" (with the name aligned a bit lower than
Hello,). Obviously, FOP isn't looking for iotatonos inside Arial.ttf
or Freesans.ttf (I've tried it with both fonts), but instead it is
trying to find iotatonos inside font "Symbol". Why is this happening?

I opened Arial.ttf and FreeSans.ttf with Character Map. The
description these two fonts have for the character " ί " is:

"U+03AF: Greek Small Letter Iota With Tonos"

So, FOP is looking for " ί " in Arial and FreeSans as "iotatonos" but
it's not there with that descritpion. Maybe that's why it's looking in
font "Symbol" later on (correct me if I am wrong). How could this
problem be solved?

Thank you again,
Nikos


2010/8/30 Spyros Papantoniou <sp...@gmail.com>:
> The "Invalid byte 2 of 2-byte UTF-8 se" points to not proper UTF encoding somewhere.
> I tested FOP 0.95 and it works with Greek!
> Do not use FreeSans, as it does include Greek glyphs [I found out the hard way..]
> I use Arial.ttf on the Mac with success.
>
>
> Are all your files UTF8 and their header UTF-8?  like:
>
>  <?xml version="1.0" encoding="UTF-8"?>
>
> Spyros Papantoniou, PhD
>
>
>
>
>
>
> On 30 Αυγ 2010, at 12:10 π.μ., Nikolaos Paraschou wrote:
>
>> First of all, thank you for your reply Spyros.
>>
>> I created myconfig2.xml with exactly the following code:
>>
>> <fop version="1.0">
>>  <renderers>
>>    <renderer mime="application/pdf">
>>      <fonts>
>>        <font   embed-url="file:///Users/nikos/MyFonts/FreeSans.ttf">
>>          <font-triplet name="FreeSans" style="normal" weight="normal"/>
>>        </font>
>>      </fonts>
>>    </renderer>
>>   </renderers>
>> </fop>
>>
>> and then I run the command:
>>
>> fop -c myconfig2.xml -xml name.xml -xsl name2fo.xsl -pdf name.pdf
>>
>> which produced again a severe exception:
>>
>> C:\Users\nikos\Desktop>fop -c myconfig2.xml -xml name.xml -xsl name2fo.xsl -pdf
>> name.pdf
>> 29 +Ϋή 2010 11:57:59 ΉΉ org.apache.fop.cli.Main startFOP
>> SEVERE: Exception
>> javax.xml.transform.TransformerException: Invalid byte 2 of 2-byte UTF-8 sequenc
>> e.
>>        at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:302)
>>        at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:130)
>>        at org.apache.fop.cli.Main.startFOP(Main.java:174)
>>        at org.apache.fop.cli.Main.main(Main.java:205)
>> Caused by: javax.xml.transform.TransformerException: Invalid byte 2 of 2-byte UT
>> F-8 sequence.
>>        at org.apache.xalan.transformer.TransformerImpl.fatalError(TransformerIm
>> pl.java:780)
>>        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
>> l.java:756)
>>        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
>> l.java:1284)
>>        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
>> l.java:1262)
>>        at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:299)
>>        ... 3 more
>>
>> ---------
>>
>> ; SystemID: file:/C:/Users/nikos/Desktop/name.xml; Line#: 1; Column#: 7
>> javax.xml.transform.TransformerException: Invalid byte 2 of 2-byte UTF-8 sequenc
>> e.
>>        at org.apache.xalan.transformer.TransformerImpl.fatalError(TransformerIm
>> pl.java:780)
>>        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
>> l.java:756)
>>        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
>> l.java:1284)
>>        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
>> l.java:1262)
>>        at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:299)
>>        at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:130)
>>        at org.apache.fop.cli.Main.startFOP(Main.java:174)
>>        at org.apache.fop.cli.Main.main(Main.java:205)
>>
>>
>> Obviously I am missing something here. Any idea what might that be?
>>
>> Thank you,
>> Nikos
>>
>>
>>
>>
>> 2010/8/29 Spyros Papantoniou <sp...@gmail.com>:
>>> Better use something like:
>>> <fop version="1.0">
>>>   <renderers>
>>>     <renderer mime="application/pdf">
>>>       <fonts>
>>>
>>> <font   embed-url="file:///Users/sjp/Triboni8090/ginkgo/fopFonts/FreeSans.ttf">
>>>           <font-triplet name="FreeSans" style="normal" weight="normal"/>
>>>         </font>
>>>
>>>       </fonts>
>>>     <renderer>
>>>    </renderers>
>>> </fop>
>>> I think you missed the actual filename in the declaration.
>>> Greek works after 0.94 version though.
>>> No Greek with 0.20!
>>>
>>> Spyros Papantoniou, PhD
>>> SIP Ltd
>>> Software Integration & Processes
>>> Ag. Konstantinou 40
>>> GR-15124 Marousi
>>> Tel: +30 210 6178270
>>>
>>>
>>> On 29 Αυγ 2010, at 7:35 μ.μ., Nikolaos Paraschou wrote:
>>>
>>> Hello,
>>>
>>> This is the first time I am using Apache FOP. I started with the quick
>>> start guide and the Hello World example which worked just fine (with
>>> Latin characters). I decided to replace "Frank" with a name in Greek
>>> characters, lets say "Νίκος".
>>>
>>> I copied "fop.xonf" to "userconfig.xml" and edited the <fonts> tag to
>>> look like this:
>>>
>>> <fonts>
>>>         <!-- register all the fonts found in a directory -->
>>>         <directory>C:\Users\nikos\MyFonts</directory>
>>> </fonts>
>>>
>>> Then I copied arial.ttf from C:\Windows\Fonts to
>>> C:\Users\nikos\MyFonts. I opened arial.ttf with the Windows program
>>> Character Map to inspect it and make sure it contains Greek glyphs. It
>>> does contain Greek glyphs.
>>>
>>> When I ran the command:
>>>
>>> fop -c userconfig.xml -xml name.xml -xsl name2fo.xsl -pdf name.pdf
>>>
>>> I got back the following severe exception:
>>>
>>> C:\Users\nikos\Desktop>fop -c myconfig.xml -xml name.xml -xsl name2fo.xsl
>>> -pdf n
>>> ame.pdf
>>> 29 ┴Ϋή 2010 7:17:22 ΉΉ org.apache.fop.apps.FopFactoryConfigurator configure
>>> INFO: Default page-height set to: 11in
>>> 29 ┴Ϋή 2010 7:17:22 ΉΉ org.apache.fop.apps.FopFactoryConfigurator configure
>>> INFO: Default page-width set to: 8.26in
>>> 29 ┴Ϋή 2010 7:17:22 ΉΉ org.apache.fop.cli.Main startFOP
>>> SEVERE: Exception
>>> javax.xml.transform.TransformerException: Invalid byte 2 of 2-byte UTF-8
>>> sequenc
>>> e.
>>>        at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:302)
>>>        at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:130)
>>>        at org.apache.fop.cli.Main.startFOP(Main.java:174)
>>>        at org.apache.fop.cli.Main.main(Main.java:205)
>>> Caused by: javax.xml.transform.TransformerException: Invalid byte 2 of
>>> 2-byte UT
>>> F-8 sequence.
>>>        at
>>> org.apache.xalan.transformer.TransformerImpl.fatalError(TransformerIm
>>> pl.java:780)
>>>        at
>>> org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
>>> l.java:756)
>>>        at
>>> org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
>>> l.java:1284)
>>>        at
>>> org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
>>> l.java:1262)
>>>        at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:299)
>>>        ... 3 more
>>>
>>> ---------
>>>
>>> ; SystemID: file:/C:/Users/nikos/Desktop/name.xml; Line#: 1; Column#: 7
>>> javax.xml.transform.TransformerException: Invalid byte 2 of 2-byte UTF-8
>>> sequenc
>>> e.
>>>        at
>>> org.apache.xalan.transformer.TransformerImpl.fatalError(TransformerIm
>>> pl.java:780)
>>>        at
>>> org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
>>> l.java:756)
>>>        at
>>> org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
>>> l.java:1284)
>>>        at
>>> org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
>>> l.java:1262)
>>>        at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:299)
>>>        at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:130)
>>>        at org.apache.fop.cli.Main.startFOP(Main.java:174)
>>>        at org.apache.fop.cli.Main.main(Main.java:205)
>>>
>>>
>>> I am using FOP version 1.0 in Windows 7 x64 and java version "1.6.0_21".
>>>
>>> Thank you,
>>> Nikos
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
>>> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>>>
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
>> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Greek text in the HelloWorld example causes Severe Exception

Posted by Spyros Papantoniou <sp...@gmail.com>.
The "Invalid byte 2 of 2-byte UTF-8 se" points to not proper UTF encoding somewhere.
I tested FOP 0.95 and it works with Greek!
Do not use FreeSans, as it does include Greek glyphs [I found out the hard way..]
I use Arial.ttf on the Mac with success.


Are all your files UTF8 and their header UTF-8?  like:

 <?xml version="1.0" encoding="UTF-8"?>

Spyros Papantoniou, PhD






On 30 Αυγ 2010, at 12:10 π.μ., Nikolaos Paraschou wrote:

> First of all, thank you for your reply Spyros.
> 
> I created myconfig2.xml with exactly the following code:
> 
> <fop version="1.0">
>  <renderers>
>    <renderer mime="application/pdf">
>      <fonts>
>        <font   embed-url="file:///Users/nikos/MyFonts/FreeSans.ttf">
>          <font-triplet name="FreeSans" style="normal" weight="normal"/>
>        </font>
>      </fonts>
>    </renderer>
>   </renderers>
> </fop>
> 
> and then I run the command:
> 
> fop -c myconfig2.xml -xml name.xml -xsl name2fo.xsl -pdf name.pdf
> 
> which produced again a severe exception:
> 
> C:\Users\nikos\Desktop>fop -c myconfig2.xml -xml name.xml -xsl name2fo.xsl -pdf
> name.pdf
> 29 +Ϋή 2010 11:57:59 ΉΉ org.apache.fop.cli.Main startFOP
> SEVERE: Exception
> javax.xml.transform.TransformerException: Invalid byte 2 of 2-byte UTF-8 sequenc
> e.
>        at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:302)
>        at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:130)
>        at org.apache.fop.cli.Main.startFOP(Main.java:174)
>        at org.apache.fop.cli.Main.main(Main.java:205)
> Caused by: javax.xml.transform.TransformerException: Invalid byte 2 of 2-byte UT
> F-8 sequence.
>        at org.apache.xalan.transformer.TransformerImpl.fatalError(TransformerIm
> pl.java:780)
>        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
> l.java:756)
>        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
> l.java:1284)
>        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
> l.java:1262)
>        at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:299)
>        ... 3 more
> 
> ---------
> 
> ; SystemID: file:/C:/Users/nikos/Desktop/name.xml; Line#: 1; Column#: 7
> javax.xml.transform.TransformerException: Invalid byte 2 of 2-byte UTF-8 sequenc
> e.
>        at org.apache.xalan.transformer.TransformerImpl.fatalError(TransformerIm
> pl.java:780)
>        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
> l.java:756)
>        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
> l.java:1284)
>        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
> l.java:1262)
>        at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:299)
>        at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:130)
>        at org.apache.fop.cli.Main.startFOP(Main.java:174)
>        at org.apache.fop.cli.Main.main(Main.java:205)
> 
> 
> Obviously I am missing something here. Any idea what might that be?
> 
> Thank you,
> Nikos
> 
> 
> 
> 
> 2010/8/29 Spyros Papantoniou <sp...@gmail.com>:
>> Better use something like:
>> <fop version="1.0">
>>   <renderers>
>>     <renderer mime="application/pdf">
>>       <fonts>
>> 
>> <font   embed-url="file:///Users/sjp/Triboni8090/ginkgo/fopFonts/FreeSans.ttf">
>>           <font-triplet name="FreeSans" style="normal" weight="normal"/>
>>         </font>
>> 
>>       </fonts>
>>     <renderer>
>>    </renderers>
>> </fop>
>> I think you missed the actual filename in the declaration.
>> Greek works after 0.94 version though.
>> No Greek with 0.20!
>> 
>> Spyros Papantoniou, PhD
>> SIP Ltd
>> Software Integration & Processes
>> Ag. Konstantinou 40
>> GR-15124 Marousi
>> Tel: +30 210 6178270
>> 
>> 
>> On 29 Αυγ 2010, at 7:35 μ.μ., Nikolaos Paraschou wrote:
>> 
>> Hello,
>> 
>> This is the first time I am using Apache FOP. I started with the quick
>> start guide and the Hello World example which worked just fine (with
>> Latin characters). I decided to replace "Frank" with a name in Greek
>> characters, lets say "Νίκος".
>> 
>> I copied "fop.xonf" to "userconfig.xml" and edited the <fonts> tag to
>> look like this:
>> 
>> <fonts>
>>         <!-- register all the fonts found in a directory -->
>>         <directory>C:\Users\nikos\MyFonts</directory>
>> </fonts>
>> 
>> Then I copied arial.ttf from C:\Windows\Fonts to
>> C:\Users\nikos\MyFonts. I opened arial.ttf with the Windows program
>> Character Map to inspect it and make sure it contains Greek glyphs. It
>> does contain Greek glyphs.
>> 
>> When I ran the command:
>> 
>> fop -c userconfig.xml -xml name.xml -xsl name2fo.xsl -pdf name.pdf
>> 
>> I got back the following severe exception:
>> 
>> C:\Users\nikos\Desktop>fop -c myconfig.xml -xml name.xml -xsl name2fo.xsl
>> -pdf n
>> ame.pdf
>> 29 ┴Ϋή 2010 7:17:22 ΉΉ org.apache.fop.apps.FopFactoryConfigurator configure
>> INFO: Default page-height set to: 11in
>> 29 ┴Ϋή 2010 7:17:22 ΉΉ org.apache.fop.apps.FopFactoryConfigurator configure
>> INFO: Default page-width set to: 8.26in
>> 29 ┴Ϋή 2010 7:17:22 ΉΉ org.apache.fop.cli.Main startFOP
>> SEVERE: Exception
>> javax.xml.transform.TransformerException: Invalid byte 2 of 2-byte UTF-8
>> sequenc
>> e.
>>        at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:302)
>>        at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:130)
>>        at org.apache.fop.cli.Main.startFOP(Main.java:174)
>>        at org.apache.fop.cli.Main.main(Main.java:205)
>> Caused by: javax.xml.transform.TransformerException: Invalid byte 2 of
>> 2-byte UT
>> F-8 sequence.
>>        at
>> org.apache.xalan.transformer.TransformerImpl.fatalError(TransformerIm
>> pl.java:780)
>>        at
>> org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
>> l.java:756)
>>        at
>> org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
>> l.java:1284)
>>        at
>> org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
>> l.java:1262)
>>        at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:299)
>>        ... 3 more
>> 
>> ---------
>> 
>> ; SystemID: file:/C:/Users/nikos/Desktop/name.xml; Line#: 1; Column#: 7
>> javax.xml.transform.TransformerException: Invalid byte 2 of 2-byte UTF-8
>> sequenc
>> e.
>>        at
>> org.apache.xalan.transformer.TransformerImpl.fatalError(TransformerIm
>> pl.java:780)
>>        at
>> org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
>> l.java:756)
>>        at
>> org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
>> l.java:1284)
>>        at
>> org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
>> l.java:1262)
>>        at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:299)
>>        at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:130)
>>        at org.apache.fop.cli.Main.startFOP(Main.java:174)
>>        at org.apache.fop.cli.Main.main(Main.java:205)
>> 
>> 
>> I am using FOP version 1.0 in Windows 7 x64 and java version "1.6.0_21".
>> 
>> Thank you,
>> Nikos
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
>> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>> 
>> 
>> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Greek text in the HelloWorld example causes Severe Exception

Posted by Nikolaos Paraschou <ni...@gmail.com>.
First of all, thank you for your reply Spyros.

I created myconfig2.xml with exactly the following code:

<fop version="1.0">
  <renderers>
    <renderer mime="application/pdf">
      <fonts>
        <font   embed-url="file:///Users/nikos/MyFonts/FreeSans.ttf">
          <font-triplet name="FreeSans" style="normal" weight="normal"/>
        </font>
      </fonts>
    </renderer>
   </renderers>
</fop>

and then I run the command:

fop -c myconfig2.xml -xml name.xml -xsl name2fo.xsl -pdf name.pdf

which produced again a severe exception:

C:\Users\nikos\Desktop>fop -c myconfig2.xml -xml name.xml -xsl name2fo.xsl -pdf
name.pdf
29 +Ϋή 2010 11:57:59 ΉΉ org.apache.fop.cli.Main startFOP
SEVERE: Exception
javax.xml.transform.TransformerException: Invalid byte 2 of 2-byte UTF-8 sequenc
e.
        at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:302)
        at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:130)
        at org.apache.fop.cli.Main.startFOP(Main.java:174)
        at org.apache.fop.cli.Main.main(Main.java:205)
Caused by: javax.xml.transform.TransformerException: Invalid byte 2 of 2-byte UT
F-8 sequence.
        at org.apache.xalan.transformer.TransformerImpl.fatalError(TransformerIm
pl.java:780)
        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
l.java:756)
        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
l.java:1284)
        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
l.java:1262)
        at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:299)
        ... 3 more

---------

; SystemID: file:/C:/Users/nikos/Desktop/name.xml; Line#: 1; Column#: 7
javax.xml.transform.TransformerException: Invalid byte 2 of 2-byte UTF-8 sequenc
e.
        at org.apache.xalan.transformer.TransformerImpl.fatalError(TransformerIm
pl.java:780)
        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
l.java:756)
        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
l.java:1284)
        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
l.java:1262)
        at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:299)
        at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:130)
        at org.apache.fop.cli.Main.startFOP(Main.java:174)
        at org.apache.fop.cli.Main.main(Main.java:205)


Obviously I am missing something here. Any idea what might that be?

Thank you,
Nikos




2010/8/29 Spyros Papantoniou <sp...@gmail.com>:
> Better use something like:
> <fop version="1.0">
>   <renderers>
>     <renderer mime="application/pdf">
>       <fonts>
>
> <font   embed-url="file:///Users/sjp/Triboni8090/ginkgo/fopFonts/FreeSans.ttf">
>           <font-triplet name="FreeSans" style="normal" weight="normal"/>
>         </font>
>
>       </fonts>
>     <renderer>
>    </renderers>
> </fop>
> I think you missed the actual filename in the declaration.
> Greek works after 0.94 version though.
> No Greek with 0.20!
>
> Spyros Papantoniou, PhD
> SIP Ltd
> Software Integration & Processes
> Ag. Konstantinou 40
> GR-15124 Marousi
> Tel: +30 210 6178270
>
>
> On 29 Αυγ 2010, at 7:35 μ.μ., Nikolaos Paraschou wrote:
>
> Hello,
>
> This is the first time I am using Apache FOP. I started with the quick
> start guide and the Hello World example which worked just fine (with
> Latin characters). I decided to replace "Frank" with a name in Greek
> characters, lets say "Νίκος".
>
> I copied "fop.xonf" to "userconfig.xml" and edited the <fonts> tag to
> look like this:
>
> <fonts>
>         <!-- register all the fonts found in a directory -->
>         <directory>C:\Users\nikos\MyFonts</directory>
> </fonts>
>
> Then I copied arial.ttf from C:\Windows\Fonts to
> C:\Users\nikos\MyFonts. I opened arial.ttf with the Windows program
> Character Map to inspect it and make sure it contains Greek glyphs. It
> does contain Greek glyphs.
>
> When I ran the command:
>
> fop -c userconfig.xml -xml name.xml -xsl name2fo.xsl -pdf name.pdf
>
> I got back the following severe exception:
>
> C:\Users\nikos\Desktop>fop -c myconfig.xml -xml name.xml -xsl name2fo.xsl
> -pdf n
> ame.pdf
> 29 ┴Ϋή 2010 7:17:22 ΉΉ org.apache.fop.apps.FopFactoryConfigurator configure
> INFO: Default page-height set to: 11in
> 29 ┴Ϋή 2010 7:17:22 ΉΉ org.apache.fop.apps.FopFactoryConfigurator configure
> INFO: Default page-width set to: 8.26in
> 29 ┴Ϋή 2010 7:17:22 ΉΉ org.apache.fop.cli.Main startFOP
> SEVERE: Exception
> javax.xml.transform.TransformerException: Invalid byte 2 of 2-byte UTF-8
> sequenc
> e.
>        at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:302)
>        at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:130)
>        at org.apache.fop.cli.Main.startFOP(Main.java:174)
>        at org.apache.fop.cli.Main.main(Main.java:205)
> Caused by: javax.xml.transform.TransformerException: Invalid byte 2 of
> 2-byte UT
> F-8 sequence.
>        at
> org.apache.xalan.transformer.TransformerImpl.fatalError(TransformerIm
> pl.java:780)
>        at
> org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
> l.java:756)
>        at
> org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
> l.java:1284)
>        at
> org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
> l.java:1262)
>        at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:299)
>        ... 3 more
>
> ---------
>
> ; SystemID: file:/C:/Users/nikos/Desktop/name.xml; Line#: 1; Column#: 7
> javax.xml.transform.TransformerException: Invalid byte 2 of 2-byte UTF-8
> sequenc
> e.
>        at
> org.apache.xalan.transformer.TransformerImpl.fatalError(TransformerIm
> pl.java:780)
>        at
> org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
> l.java:756)
>        at
> org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
> l.java:1284)
>        at
> org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
> l.java:1262)
>        at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:299)
>        at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:130)
>        at org.apache.fop.cli.Main.startFOP(Main.java:174)
>        at org.apache.fop.cli.Main.main(Main.java:205)
>
>
> I am using FOP version 1.0 in Windows 7 x64 and java version "1.6.0_21".
>
> Thank you,
> Nikos
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Greek text in the HelloWorld example causes Severe Exception

Posted by Spyros Papantoniou <sp...@gmail.com>.
Better use something like:

<fop version="1.0">
  <renderers>
    <renderer mime="application/pdf">
      <fonts>
        <font   embed-url="file:///Users/sjp/Triboni8090/ginkgo/fopFonts/FreeSans.ttf">
          <font-triplet name="FreeSans" style="normal" weight="normal"/>
        </font>
       
      </fonts>
    <renderer>
   </renderers>
</fop>

I think you missed the actual filename in the declaration.
Greek works after 0.94 version though.
No Greek with 0.20!


Spyros Papantoniou, PhD

SIP Ltd
Software Integration & Processes
Ag. Konstantinou 40
GR-15124 Marousi

Tel: +30 210 6178270



On 29 Αυγ 2010, at 7:35 μ.μ., Nikolaos Paraschou wrote:

> Hello,
> 
> This is the first time I am using Apache FOP. I started with the quick
> start guide and the Hello World example which worked just fine (with
> Latin characters). I decided to replace "Frank" with a name in Greek
> characters, lets say "Νίκος".
> 
> I copied "fop.xonf" to "userconfig.xml" and edited the <fonts> tag to
> look like this:
> 
> <fonts>
>         <!-- register all the fonts found in a directory -->
>         <directory>C:\Users\nikos\MyFonts</directory>
> </fonts>
> 
> Then I copied arial.ttf from C:\Windows\Fonts to
> C:\Users\nikos\MyFonts. I opened arial.ttf with the Windows program
> Character Map to inspect it and make sure it contains Greek glyphs. It
> does contain Greek glyphs.
> 
> When I ran the command:
> 
> fop -c userconfig.xml -xml name.xml -xsl name2fo.xsl -pdf name.pdf
> 
> I got back the following severe exception:
> 
> C:\Users\nikos\Desktop>fop -c myconfig.xml -xml name.xml -xsl name2fo.xsl -pdf n
> ame.pdf
> 29 ┴Ϋή 2010 7:17:22 ΉΉ org.apache.fop.apps.FopFactoryConfigurator configure
> INFO: Default page-height set to: 11in
> 29 ┴Ϋή 2010 7:17:22 ΉΉ org.apache.fop.apps.FopFactoryConfigurator configure
> INFO: Default page-width set to: 8.26in
> 29 ┴Ϋή 2010 7:17:22 ΉΉ org.apache.fop.cli.Main startFOP
> SEVERE: Exception
> javax.xml.transform.TransformerException: Invalid byte 2 of 2-byte UTF-8 sequenc
> e.
>        at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:302)
>        at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:130)
>        at org.apache.fop.cli.Main.startFOP(Main.java:174)
>        at org.apache.fop.cli.Main.main(Main.java:205)
> Caused by: javax.xml.transform.TransformerException: Invalid byte 2 of 2-byte UT
> F-8 sequence.
>        at org.apache.xalan.transformer.TransformerImpl.fatalError(TransformerIm
> pl.java:780)
>        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
> l.java:756)
>        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
> l.java:1284)
>        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
> l.java:1262)
>        at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:299)
>        ... 3 more
> 
> ---------
> 
> ; SystemID: file:/C:/Users/nikos/Desktop/name.xml; Line#: 1; Column#: 7
> javax.xml.transform.TransformerException: Invalid byte 2 of 2-byte UTF-8 sequenc
> e.
>        at org.apache.xalan.transformer.TransformerImpl.fatalError(TransformerIm
> pl.java:780)
>        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
> l.java:756)
>        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
> l.java:1284)
>        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
> l.java:1262)
>        at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:299)
>        at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:130)
>        at org.apache.fop.cli.Main.startFOP(Main.java:174)
>        at org.apache.fop.cli.Main.main(Main.java:205)
> 
> 
> I am using FOP version 1.0 in Windows 7 x64 and java version "1.6.0_21".
> 
> Thank you,
> Nikos
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>