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 JK...@lacare.org on 2008/02/21 02:32:00 UTC
Embeding Unicode Font Causing Out of Memory
I am working on a project to generate pdf files in Chinese. It works fine
when it runs stand alone. It causes a out of memory error when it is
running on Tomcat 5.5. Here are some additional information:
Fop version: 0.94
Configuration File:
<?xml version="1.0"?>
<fop version="1.0">
<base>.</base>
<source-resolution>72</source-resolution>
<target-resolution>72</target-resolution>
<default-page-settings height="11in" width="8.26in"/>
<renderers>
<renderer mime="application/pdf">
<filterList>
<value>flate</value>
</filterList>
<fonts>
<font metrics-url="C:/arialuni.xml" embed-url=
"C:/windows/Fonts/arialuni.ttf" kerning="yes">
<font-triplet name="arialuni" style="normal" weight=
"normal"/>
<font-triplet name="arialuni" style="normal" weight="bold"
/>
<font-triplet name="arialuni" style="italic" weight=
"normal"/>
<font-triplet name="arialuni" style="italic" weight="bold"
/>
</font>
</fonts>
</renderer>
</renderers>
</fop>
Error message:
Caused by: java.lang.OutOfMemoryError: Java heap space
at org.apache.commons.io.output.ByteArrayOutputStream.toByteArray(
ByteArrayOutputStream.java:194)
at org.apache.commons.io.IOUtils.toByteArray(IOUtils.java:216)
at org.apache.fop.fonts.truetype.FontFileReader.init(
FontFileReader.java:45)
at org.apache.fop.fonts.truetype.FontFileReader.<init>(
FontFileReader.java:74)
at org.apache.fop.pdf.PDFFactory.makeFontFile(PDFFactory.java:1389
)
at org.apache.fop.pdf.PDFFactory.makeFontDescriptor(
PDFFactory.java:1294)
at org.apache.fop.pdf.PDFFactory.makeFont(PDFFactory.java:1179)
at org.apache.fop.pdf.PDFResources.addFonts(PDFResources.java:109)
at org.apache.fop.render.pdf.PDFRenderer.stopRenderer(
PDFRenderer.java:505)
at org.apache.fop.area.RenderPagesModel.endDocument(
RenderPagesModel.java:245)
at org.apache.fop.area.AreaTreeHandler.endDocument(
AreaTreeHandler.java:283)
at org.apache.fop.fo.FOTreeBuilder.endDocument(
FOTreeBuilder.java:171)
at
org.apache.xalan.transformer.TransformerIdentityImpl.endDocument(
TransformerIdentityImpl.java:962)
at org.jdom.output.SAXOutputter.endDocument(SAXOutputter.java:843)
at org.jdom.output.SAXOutputter.output(SAXOutputter.java:634)
at org.jdom.transform.JDOMSource$DocumentReader.parse(
JDOMSource.java:518)
at org.apache.xalan.transformer.TransformerIdentityImpl.transform(
TransformerIdentityImpl.java:484)
If I do not use configuration file, the applicaiton works fine except all
Chinese characters are displayed as #.
Could someone help me this out?
Jason Kong
Business Solutions
L.A. Care Health Plan
213 6941250 x4367
Re: Embeding Unicode Font Causing Out of Memory
Posted by JK...@lacare.org.
Thank you for your response. Actually I had tried to increase Tomcat's
maximum heap size to 1024m. It does not help. You are right. It is a
Tomcat's problem. I will seek help from Tomcat's mailing list.
Jason Kong
Stefan Heuer <sh...@gmx.de>
02/21/2008 01:03 AM
Please respond to
fop-users@xmlgraphics.apache.org
To
fop-users@xmlgraphics.apache.org
cc
Subject
Re: Embeding Unicode Font Causing Out of Memory
JKong@lacare.org schrieb:
>
> I am working on a project to generate pdf files in Chinese. It works
> fine when it runs stand alone. It causes a out of memory error when it
> is running on Tomcat 5.5. Here are some additional information:
>
I don't think it's a FOP problem. Try to increase heap memory of the
virtual machine when you start your Tomcat. I think you can modify
"catalina.sh"/"catalina.bat"
Run "java -X" on commandline to see additional commandline parameters.
Regards
Stefan
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Embeding Unicode Font Causing Out of Memory
Posted by Stefan Heuer <sh...@gmx.de>.
JKong@lacare.org schrieb:
>
> I am working on a project to generate pdf files in Chinese. It works
> fine when it runs stand alone. It causes a out of memory error when it
> is running on Tomcat 5.5. Here are some additional information:
>
I don't think it's a FOP problem. Try to increase heap memory of the
virtual machine when you start your Tomcat. I think you can modify
"catalina.sh"/"catalina.bat"
Run "java -X" on commandline to see additional commandline parameters.
Regards
Stefan
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org