|
Hi,
I am using FOP 0.20.5 to generate PDF
documents on the fly in my web application
I get an OutOfMemoryError when I try to generate
PDFs with Asian language fonts
I found out that this is due to embedding the font
in the PDF
It seems that for every rendering of the PDF, the
FOP driver loads the entire font file in memory
(I am using some custom third-party fonts
which have approx 30 MB TTF files)
When there are concurrent requests for PDF
generation in my web app, the memory demand surges and causes
OutOfMemoryError
It seems that the memory allocated for the TTF file
is not released as soon as the rendering is complete
Increasing JVM heap size does help..but only upto a
certain extent
I tried removing the "embed-file" option from the
config file and the memory problem does not occur
However, Adobe Acrobat 6 does not seem to find the
custom font even when it is installed on my Windows system
The custom font is not from the Asian Font Pack
from Adobe; it is a Monotype Sans font from Agfa
I have two questions:
1. Is it possible to prevent loading of the TTF
file into memory every time a PDF is rendered? (by doing some sort of
caching)
2. Is it possible (through any public FOP API) to
pass the TTF file only once to FOP, so that it is cached in memory?
Any alternative solution / suggestion is
welcome!
Thanks and regards,
Sourabh Patwardhan |
- Problem with Asian language fonts Sourabh Patwardhan
- Re: Problem with Asian language fonts Jeremias Maerki
- Re: Problem with Asian language fonts J.Pietschmann
- RE: Problem with Asian language fonts Pascal Sancho
