FOP Supports Multiple Charset ?

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

FOP Supports Multiple Charset ?

Lalitha Prasad
Hi,

  I need to print Special Charactors in PDF file. ie. Trade Marks  and etc.

Is it possible to print more than two Charsets usinf FOP?.

Thanks in Advance,
LALITH

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

Reply | Threaded
Open this post in threaded view
|

Re: FOP Supports Multiple Charset ?

Jeremias Maerki
We'd appreciate if you would post questions on FOP to the fop-user
mailing list next time. Thank you.

Since we have XML charsets are less of a problem today. I suggest you
use UTF-8 as encoding for your XML documents so you have the full
Unicode charset available to you which can map every character you will
need.

Please have a look at the following example FO file:

examples/fo/basic/fonts.fo (in the FOP distribution)
or
http://cvs.apache.org/viewcvs.cgi/xml-fop/examples/fo/basic/fonts.fo?rev=1.3&view=markup

Some additional info here:
http://xml.apache.org/fop/fo.html#xml-special-chars

On 07.06.2005 09:26:33 Lalitha Prasad wrote:
>   I need to print Special Charactors in PDF file. ie. Trade Marks  and etc.
>
> Is it possible to print more than two Charsets usinf FOP?.


Jeremias Maerki

Reply | Threaded
Open this post in threaded view
|

Re: FOP Supports Multiple Charset ?

Lalitha Prasad
If the Charset is "UTF-8". I got the following exceptions:

1. "javax.servlet.ServletException: Invalid byte 1 of 1-byte UTF-8
sequence."   and
2. "javax.servlet.ServletException: An invalid XML character (Unicode: 0x19)
was fou
nd in the element content of the document."

I have changed the Charset from UTF-8 to ISO-8859-1. Now I cann't print some
Special Charactors on the PDF eventhough those characters are displaying in
HTML Interfaces.

Please help me in this regard. We are using "Fop -xsl foo.xsl -xml foo.xml
-pdf foo.pdf" pattern forgenerating PDF files using FOP.

Thanks in advance.

Regards,
LALITH








>From: Jeremias Maerki <[hidden email]>
>Reply-To: [hidden email]
>To: [hidden email]
>Subject: Re: FOP Supports Multiple Charset ?
>Date: Tue, 07 Jun 2005 10:22:37 +0200
>
>We'd appreciate if you would post questions on FOP to the fop-user
>mailing list next time. Thank you.
>
>Since we have XML charsets are less of a problem today. I suggest you
>use UTF-8 as encoding for your XML documents so you have the full
>Unicode charset available to you which can map every character you will
>need.
>
>Please have a look at the following example FO file:
>
>examples/fo/basic/fonts.fo (in the FOP distribution)
>or
>http://cvs.apache.org/viewcvs.cgi/xml-fop/examples/fo/basic/fonts.fo?rev=1.3&view=markup
>
>Some additional info here:
>http://xml.apache.org/fop/fo.html#xml-special-chars
>
>On 07.06.2005 09:26:33 Lalitha Prasad wrote:
> >   I need to print Special Charactors in PDF file. ie. Trade Marks  and
>etc.
> >
> > Is it possible to print more than two Charsets usinf FOP?.
>
>
>Jeremias Maerki
>

_________________________________________________________________
Don?t just search. Find. Check out the new MSN Search!
http://search.msn.click-url.com/go/onm00200636ave/direct/01/

Reply | Threaded
Open this post in threaded view
|

Re: FOP Supports Multiple Charset ?

Jeremias Maerki
Use a proper XML editor to create XML files and you won't have problems
like that. Obviously, you create invalid XML files, probably with a
normal text editor, right? But even if you use ISO-8859-1 you can use
the same character references as shown in the links I gave you earlier.

On 07.06.2005 11:22:32 Lalitha Prasad wrote:

> If the Charset is "UTF-8". I got the following exceptions:
>
> 1. "javax.servlet.ServletException: Invalid byte 1 of 1-byte UTF-8
> sequence."   and
> 2. "javax.servlet.ServletException: An invalid XML character (Unicode: 0x19)
> was fou
> nd in the element content of the document."
>
> I have changed the Charset from UTF-8 to ISO-8859-1. Now I cann't print some
> Special Charactors on the PDF eventhough those characters are displaying in
> HTML Interfaces.
>
> Please help me in this regard. We are using "Fop -xsl foo.xsl -xml foo.xml
> -pdf foo.pdf" pattern forgenerating PDF files using FOP.
>
> Thanks in advance.
>
> Regards,
> LALITH
>
>
>
>
>
>
>
>
> >From: Jeremias Maerki <[hidden email]>
> >Reply-To: [hidden email]
> >To: [hidden email]
> >Subject: Re: FOP Supports Multiple Charset ?
> >Date: Tue, 07 Jun 2005 10:22:37 +0200
> >
> >We'd appreciate if you would post questions on FOP to the fop-user
> >mailing list next time. Thank you.
> >
> >Since we have XML charsets are less of a problem today. I suggest you
> >use UTF-8 as encoding for your XML documents so you have the full
> >Unicode charset available to you which can map every character you will
> >need.
> >
> >Please have a look at the following example FO file:
> >
> >examples/fo/basic/fonts.fo (in the FOP distribution)
> >or
> >http://cvs.apache.org/viewcvs.cgi/xml-fop/examples/fo/basic/fonts.fo?rev=1.3&view=markup
> >
> >Some additional info here:
> >http://xml.apache.org/fop/fo.html#xml-special-chars
> >
> >On 07.06.2005 09:26:33 Lalitha Prasad wrote:
> > >   I need to print Special Charactors in PDF file. ie. Trade Marks  and
> >etc.
> > >
> > > Is it possible to print more than two Charsets usinf FOP?.
> >
> >
> >Jeremias Maerki
> >
>
> _________________________________________________________________
> Don’t just search. Find. Check out the new MSN Search!
> http://search.msn.click-url.com/go/onm00200636ave/direct/01/



Jeremias Maerki

Reply | Threaded
Open this post in threaded view
|

Re: FOP Supports Multiple Charset ?

J.Pietschmann
In reply to this post by Lalitha Prasad
Lalitha Prasad wrote:
> Now I cann't print
> some Special Charactors on the PDF eventhough those characters are
> displaying in HTML Interfaces.

See also
  http://xml.apache.org/fop/faq.html#pdf-characters
  http://xml.apache.org/fop/fo.html#xml-special-chars

J.Pietschmann
Reply | Threaded
Open this post in threaded view
|

Re: FOP Supports Multiple Charset ?

Lalitha Prasad
Hi Pietschmann,

Thanks for your reply.

  The main pointing issue is we should display the following list of
Characters in PDF.

  http://courses.chem.psu.edu/chem38/technical/special-characters.html

We are doing Drugs related project. Users will paste the information from MS
Word into our Applications Form. We have provided the Print option for
taking Printouts.For that we are using FOP.

It is displaying correctly in our JSPs.

Can we display these Characters in PDF using FOP?.

If possible please send me that information ASAP.

Thanks in Advance,
LALITH









>From: "J.Pietschmann" <[hidden email]>
>Reply-To: [hidden email]
>To: [hidden email]
>Subject: Re: FOP Supports Multiple Charset ?
>Date: Tue, 07 Jun 2005 22:00:51 +0200
>
>Lalitha Prasad wrote:
>>Now I cann't print some Special Charactors on the PDF eventhough those
>>characters are displaying in HTML Interfaces.
>
>See also
>  http://xml.apache.org/fop/faq.html#pdf-characters
>  http://xml.apache.org/fop/fo.html#xml-special-chars
>
>J.Pietschmann

_________________________________________________________________
On the road to retirement? Check out MSN Life Events for advice on how to
get there! http://lifeevents.msn.com/category.aspx?cid=Retirement

Reply | Threaded
Open this post in threaded view
|

RE: FOP Supports Multiple Charset ?

Gaywood, Mark
In reply to this post by Lalitha Prasad
You may find this site useful

http://www.unicode.org/unibook/

Mark Gaywood
theframe Programme
Catlin Underwriting Agencies Limited
7th Floor, 3 Minster Court, Mincing Lane, London EC3 7DD
[hidden email]
Catlin Underwriting Agencies Ltd and Catlin Insurance Company Ltd are
authorised and regulated by the Financial Services Authority



-----Original Message-----
From: Lalitha Prasad [mailto:[hidden email]]
Sent: Wednesday, June 08, 2005 6:13 AM
To: [hidden email]
Subject: Re: FOP Supports Multiple Charset ?


Hi Pietschmann,

Thanks for your reply.

  The main pointing issue is we should display the following list of
Characters in PDF.

  http://courses.chem.psu.edu/chem38/technical/special-characters.html

We are doing Drugs related project. Users will paste the information
from MS
Word into our Applications Form. We have provided the Print option for
taking Printouts.For that we are using FOP.

It is displaying correctly in our JSPs.

Can we display these Characters in PDF using FOP?.

If possible please send me that information ASAP.

Thanks in Advance,
LALITH









>From: "J.Pietschmann" <[hidden email]>
>Reply-To: [hidden email]
>To: [hidden email]
>Subject: Re: FOP Supports Multiple Charset ?
>Date: Tue, 07 Jun 2005 22:00:51 +0200
>
>Lalitha Prasad wrote:
>>Now I cann't print some Special Charactors on the PDF eventhough those
>>characters are displaying in HTML Interfaces.
>
>See also
>  http://xml.apache.org/fop/faq.html#pdf-characters
>  http://xml.apache.org/fop/fo.html#xml-special-chars
>
>J.Pietschmann

_________________________________________________________________
On the road to retirement? Check out MSN Life Events for advice on how
to
get there! http://lifeevents.msn.com/category.aspx?cid=Retirement



This e-mail is confidential and intended solely for the use of the individual(s) to whom it is addressed.  If you are not the intended recipient, be advised that you have received this e-mail in error and that any use, dissemination, forwarding, printing, copying of , or any action taken in reliance upon, it is strictly prohibited and may be illegal.
Reply | Threaded
Open this post in threaded view
|

Re: FOP Supports Multiple Charset ?

J.Pietschmann
In reply to this post by Lalitha Prasad
Lalitha Prasad wrote:
>  The main pointing issue is we should display the following list of
> Characters in PDF.
>
>  http://courses.chem.psu.edu/chem38/technical/special-characters.html

You can use all these characters provided you install a font containing
glyphs for the characters. See
  http://xml.apache.org/fop/fonts.html
It's up to you to get an apropriate font. You might take a look at your
Windows font directory.

J.Pietschmann
Reply | Threaded
Open this post in threaded view
|

Re: FOP Supports Multiple Charset ?

Lalitha Prasad
Yes , we can print the special characters using different fonts ( ie. Symbol
). But i need to print original chars also.It seems very difficult to apply
muliple font for muliple occurences of special Characters.

Do you have any easy method to print one paragraph with different
font-families?. I can apply different fonts by using XSL and XSL:FO.

              <fo:in-line font-family="Symbol">&#8805;</fo:in-line>. i can
print '??' in PDF.


If you know any easy method. please let me know.

Regards,
LALITH




>From: "J.Pietschmann" <[hidden email]>
>Reply-To: [hidden email]
>To: [hidden email]
>Subject: Re: FOP Supports Multiple Charset ?
>Date: Wed, 08 Jun 2005 21:57:38 +0200
>
>Lalitha Prasad wrote:
>>  The main pointing issue is we should display the following list of
>>Characters in PDF.
>>
>>  http://courses.chem.psu.edu/chem38/technical/special-characters.html
>
>You can use all these characters provided you install a font containing
>glyphs for the characters. See
>  http://xml.apache.org/fop/fonts.html
>It's up to you to get an apropriate font. You might take a look at your
>Windows font directory.
>
>J.Pietschmann

_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar ? get it now!
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/

Reply | Threaded
Open this post in threaded view
|

Re: FOP Supports Multiple Charset ?

Jeremias Maerki
The theory is to specify multiple font-families which the formatter then
uses as necessary:

<fo:block font-family="Helvetica Symbol">Normal text and a symbol &#8805;
and again some text.</fo:block>

But as theory goes, this is not yet implemented in FOP. So there's no
easy method.

On 09.06.2005 06:42:20 Lalitha Prasad wrote:

> Yes , we can print the special characters using different fonts ( ie. Symbol
> ). But i need to print original chars also.It seems very difficult to apply
> muliple font for muliple occurences of special Characters.
>
> Do you have any easy method to print one paragraph with different
> font-families?. I can apply different fonts by using XSL and XSL:FO.
>
>               <fo:in-line font-family="Symbol">&#8805;</fo:in-line>. i can
> print '¡Ü' in PDF.
>
>
> If you know any easy method. please let me know.


Jeremias Maerki

Reply | Threaded
Open this post in threaded view
|

Re: FOP Supports Multiple Charset ?

J.Pietschmann
In reply to this post by Lalitha Prasad
Lalitha Prasad wrote:
> Yes , we can print the special characters using different fonts ( ie.
> Symbol ). But i need to print original chars also.It seems very
> difficult to apply muliple font for muliple occurences of special
> Characters.
>
> Do you have any easy method to print one paragraph with different
> font-families?.

If you install and use a user font which has all necessary glyphs, for
example the well known Arial Unicode font, you don't have to switch the
font family in the FO source.

J.Pietschmann
Reply | Threaded
Open this post in threaded view
|

Re: FOP Supports Multiple Charset ?

Lalitha Prasad
Hi,

  While generating font metrics file . I am getting the following exception:

C:\Java\fop-0.20.5>java -cp
"fop.jar;avalon-framework.jar;xml-apis.jar;xercesImp
l-2.2.1.jar;xalan-2.4.1.jar" org.apache.fop.fonts.apps.TTFReader
C:\Java\fop-0.2
0.5\Arialuni.ttf C:\Java\fop-0.20.5\arialuni.xml
TTF Reader v1.1.1

Reading C:\Java\fop-0.20.5\Arialuni.ttf...

Number of glyphs in font: 51180
Postscript format 3
Creating xml font file...

Creating CID encoded metrics
Writing xml font file C:\Java\fop-0.20.5\arialuni.xml...

javax.xml.transform.TransformerException: java.io.FileNotFoundException:
file:\C
:\Java\fop-0.20.5\arialuni.xml (The filename, directory name, or volume
label sy
ntax is incorrect)
        at
org.apache.xalan.transformer.TransformerIdentityImpl.createResultCont
entHandler(TransformerIdentityImpl.java:263)
        at
org.apache.xalan.transformer.TransformerIdentityImpl.transform(Transf
ormerIdentityImpl.java:296)
        at
org.apache.fop.fonts.apps.TTFReader.writeFontXML(TTFReader.java:243)
        at org.apache.fop.fonts.apps.TTFReader.main(TTFReader.java:196)
Caused by: java.io.FileNotFoundException:
file:\C:\Java\fop-0.20.5\arialuni.xml
(The filename, directory name, or volume label syntax is incorrect)
        at java.io.FileOutputStream.open(Native Method)
        at java.io.FileOutputStream.<init>(Unknown Source)
        at java.io.FileOutputStream.<init>(Unknown Source)
        at
org.apache.xalan.transformer.TransformerIdentityImpl.createResultCont
entHandler(TransformerIdentityImpl.java:253)
        ... 3 more
---------
java.io.FileNotFoundException: file:\C:\Java\fop-0.20.5\arialuni.xml (The
filena
me, directory name, or volume label syntax is incorrect)
        at java.io.FileOutputStream.open(Native Method)
        at java.io.FileOutputStream.<init>(Unknown Source)
        at java.io.FileOutputStream.<init>(Unknown Source)
        at
org.apache.xalan.transformer.TransformerIdentityImpl.createResultCont
entHandler(TransformerIdentityImpl.java:253)
        at
org.apache.xalan.transformer.TransformerIdentityImpl.transform(Transf
ormerIdentityImpl.java:296)
        at
org.apache.fop.fonts.apps.TTFReader.writeFontXML(TTFReader.java:243)
        at org.apache.fop.fonts.apps.TTFReader.main(TTFReader.java:196)
This font contains no embedding license restrictions

What might be the reason. All jar and other Font ttf files are in the same
directory.

Please help me.

Thanks in Advance,

LALITH





>From: "J.Pietschmann" <[hidden email]>
>Reply-To: [hidden email]
>To: [hidden email]
>Subject: Re: FOP Supports Multiple Charset ?
>Date: Thu, 09 Jun 2005 21:11:05 +0200
>
>Lalitha Prasad wrote:
>>Yes , we can print the special characters using different fonts ( ie.
>>Symbol ). But i need to print original chars also.It seems very difficult
>>to apply muliple font for muliple occurences of special Characters.
>>
>>Do you have any easy method to print one paragraph with different
>>font-families?.
>
>If you install and use a user font which has all necessary glyphs, for
>example the well known Arial Unicode font, you don't have to switch the
>font family in the FO source.
>
>J.Pietschmann

_________________________________________________________________
Don?t just search. Find. Check out the new MSN Search!
http://search.msn.click-url.com/go/onm00200636ave/direct/01/

Reply | Threaded
Open this post in threaded view
|

Re: FOP Supports Multiple Charset ?

J.Pietschmann
Lalitha Prasad wrote:
>  While generating font metrics file . I am getting the following exception:
[snip]
> javax.xml.transform.TransformerException: java.io.FileNotFoundException:
> file:\C
> :\Java\fop-0.20.5\arialuni.xml (The filename, directory name, or volume

Ouch!

Try one of the following:
1. Create the mmetrics file in the local directory and move it later to
its final destination
  java -cp
"fop.jar;avalon-framework.jar;xml-apis.jar;xercesImpl-2.2.1.jar;xalan-2.4.1.jar"
    org.apache.fop.fonts.apps.TTFReader C:\Java\fop-0.20.5\Arialuni.ttf
arialuni.xml

2. Try a file URL for the metrics file:
  java -cp
"fop.jar;avalon-framework.jar;xml-apis.jar;xercesImpl-2.2.1.jar;xalan-2.4.1.jar"
    org.apache.fop.fonts.apps.TTFReader C:\Java\fop-0.20.5\Arialuni.ttf
file:///C:/Java/fop-0.20.5/arialuni.xml

J.Pietschmann
Reply | Threaded
Open this post in threaded view
|

Re: FOP Supports Multiple Charset ?

Lalitha Prasad
Hi Pietschmann,

Thanks you.I am able to generate font metrics file. Also I have sucessfully
generated PDF with all Characters. But from the Application it is not
working.Here in my jsp i have mentioned like this.

  File userConfigFile = new
File(application.getRealPath(System.getProperty("file.separator"))+System.getProperty("file.separator")+"WEB-INF"+System.getProperty("file.separator")+"userconfig.xml");
          Options options = new Options(userConfigFile);  
response.setContentType("application/pdf");  
response.addHeader("Content-Disposition","attachment;filename=APLAC_"+ptlNumber+".pdf");
          Driver driver = new Driver();
                  driver.setLogger(log);
                   driver.setRenderer(Driver.RENDER_PDF);  
driver.setOutputStream(out1);    
driver.render(inputHandler.getParser(), inSource);  byte[] content =
out1.toByteArray();
                 response.setContentLength(content.length);  
response.getOutputStream().write(content);  
response.getOutputStream().flush();

userconfig.xml file is as:

<!--<!DOCTYPE configuration SYSTEM "config.dtd">-->
<!--
     this file contains templates which allow an user easy
     configuration of Fop. Actually normally you don't need this
configuration
     file, but if you need to change configuration, you should
     always use this file and *not* config.xml.
     Usage: java org.apache.fop.apps.Fop -c userconfig.xml -fo fo-file -pdf
pdf-file
-->
<configuration>
<!--
baseDir: normally the base directory is the directory where the fo file is
         located. if you want to specify your own, uncomment this entry.
         This value can also be a URL. Actually, the value is converted to
         a URL.
-->
<!--
  <entry>
    <key>baseDir</key>
    <value></value>
  </entry>
-->

<!--
fontBaseDir: Similar to baseDir, except that this value is used for fonts.
If
         it isn't specified, the value from baseDir is used.
-->

  <entry>
    <key>fontBaseDir</key>
    <value></value>
  </entry>


<!--
************************************************************************
                        HYPHENATION
************************************************************************
-->

<!--
   hyphenation directory
   if you want to specify your own directory with hyphenation pattern
   then uncomment the next entry and add the directory name
-->

<!--
  <entry>
    <key>hyphenation-dir</key>
    <value>/java/xml-fop/hyph</value>
  </entry>
-->

<!--
************************************************************************
  Add fonts here
************************************************************************

-->

<fonts>
<!-- example -->
<font metrics-file="C:\Java\Tomcat-4.1\webapps\glaxo\arialuni.xml"
embed-file="c:/winnt/fonts/Arialuni.TTF" kerning="yes">
    <font-triplet name="ArialUnicodeMS" style="normal" weight="normal"/>
    <font-triplet name="ArialUnicodeMS" style="normal" weight="bold"/>
    <font-triplet name="ArialUnicodeMS" style="italic" weight="normal"/>
    <font-triplet name="ArialUnicodeMS" style="italic" weight="bold"/>
  </font>
</fonts>
</configuration>

I have tried with all type of paths like
http://localhost:8090/glaxo/arialuni.xml.

But i am getting the following Exception:

exception typenull
org.apache.jasper.JasperException
        at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
.java:254)
        at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:2
95)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDisp
atcher.java:684)
        at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationD
ispatcher.java:432)
        at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDis
patcher.java:356)
        at
com.as.web.framework.ControlServlet.doGet(ControlServlet.java:162)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:247)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:193)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:256)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:643)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:480)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:191)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:643)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:480)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

        at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:
2417)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:180)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:643)
        at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatche
rValve.java:171)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:641)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:172)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:641)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:480)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:174)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:643)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:480)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

        at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:19
3)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:781)
        at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
ssConnection(Http11Protocol.java:549)
        at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java
:589)
        at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
ool.java:666)
        at java.lang.Thread.run(Thread.java:534)


If i mention "ArialUnicodeMS" font-family in XSL.then only I am getting this
exception.Otherwise it will open PDF with normal old font.

What might be the reason?. Please help me.

Regards,
LALITH












>From: "J.Pietschmann" <[hidden email]>
>Reply-To: [hidden email]
>To: [hidden email]
>Subject: Re: FOP Supports Multiple Charset ?
>Date: Mon, 13 Jun 2005 22:24:36 +0200
>
>Lalitha Prasad wrote:
>>  While generating font metrics file . I am getting the following
>>exception:
>[snip]
>>javax.xml.transform.TransformerException: java.io.FileNotFoundException:
>>file:\C
>>:\Java\fop-0.20.5\arialuni.xml (The filename, directory name, or volume
>
>Ouch!
>
>Try one of the following:
>1. Create the mmetrics file in the local directory and move it later to
>its final destination
>  java -cp
>"fop.jar;avalon-framework.jar;xml-apis.jar;xercesImpl-2.2.1.jar;xalan-2.4.1.jar"
>    org.apache.fop.fonts.apps.TTFReader C:\Java\fop-0.20.5\Arialuni.ttf
>arialuni.xml
>
>2. Try a file URL for the metrics file:
>  java -cp
>"fop.jar;avalon-framework.jar;xml-apis.jar;xercesImpl-2.2.1.jar;xalan-2.4.1.jar"
>    org.apache.fop.fonts.apps.TTFReader C:\Java\fop-0.20.5\Arialuni.ttf
>file:///C:/Java/fop-0.20.5/arialuni.xml
>
>J.Pietschmann

_________________________________________________________________
Don?t just search. Find. Check out the new MSN Search!
http://search.msn.click-url.com/go/onm00200636ave/direct/01/

Reply | Threaded
Open this post in threaded view
|

Re: FOP Supports Multiple Charset ?

J.Pietschmann
Lalitha Prasad wrote:
> Hi Pietschmann,
> <font metrics-file="C:\Java\Tomcat-4.1\webapps\glaxo\arialuni.xml"
                      ^^^^
This must be a proper URL, not a file name.


>        <font-triplet name="ArialUnicodeMS" style="normal" weight="normal"/>
>        <font-triplet name="ArialUnicodeMS" style="normal" weight="bold"/>

I don't think putting more than a font triple inside a font is going to
work, at the very least your bold/italic would look like normal.
You'll probably have to get italic/bold versions of the font as well.
FOP can't generate italic or bold versions from a normal font.

> But i am getting the following Exception:
>
> exception typenull
> org.apache.jasper.JasperException

Well, you ultimately caught a wrapper exception with no message. That's
bad both for your application and for tracking down the cause of the
problem.

> What might be the reason?

I have no idea. Wrap a try/catch block around the FOP code and log
any exception you get.

J.Pietschmann