Fop servlet crash after some days

2005-02-11 Thread Cédric Augustin
Hello,

1) The problem :
The servlet crash after few days (some time 3, some time 20). In the tomcat
logs, we get the following error :
StandardWrapperValve[Fop]: Servlet.service() pour la servlet Fop a généré
une exception java.lang.OutOfMemoryError

We have to restart Tomcat.
On an older server, with a smaller processor, the same java and same tomcat,
the servlet never crash (with less activity too).

2)The context :
I am succesfully using fop servlet to generate on fly pdf file. The file are
between 100Kb to 1Mb, with 1 to 3 pages. Most of the zize comme from the
inclued images (3 to 9 photos in print quality size). The servlet produce
about 15 PDF file per hours.

When tomcat start, and after some run of fop servlet, the java process are
arround 30Mb and increase all the time.

3) What we try :
We tought the problem come from the image cache. We run a script who ask for
a static fo file modified with PHP to change all the image urls by adding a
timestamp to avoid fop image cache. The shell script loop 1000 time and is
running 3 or more time. If the script wait 2s beetwen each fop generation,
the memory usage go to 158Mb for each java process and stay stable. fop does
not crash. 

If the script don't wait, the memory consumption increase very fast to 273Mb
for each java process, many process crash and tomcat create new process. The
servlet become unstable and at the end do not respond anymore.

The second test where the script don't wait has no real word equivalent. The
first script waiting 2s look like the reality.

3) Detailled question :
I do not reset the image cache because of Internet explorer who use to call
2 times an url to download the pdf. By caching the image, the second
generation is very short.
I thought fop is caching all photos and growing in memory size, but our test
can not reproduce the crash in the same situation. We see the memory
consumption increasing and the garbage collector never run.

Do I have to manualy reset the fop image cache or does fop reset itself ?
If i create a dedicated method in my servlet to reset the cache should I
take care about anything special ?
My cheef don't think it's the image cache the problem, do you have any
suggestion to investigate ?

Thank by advance for your advices.


Cédric Augustin

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Base font and russian

2004-10-14 Thread Cédric Augustin
 Chris is right. The base14 fonts (Helvetica, Times and Courier, not
 Symbol and ZapfDingbats) are defined in ISO-Latin1 format (if 
 I remember
 correctly). You won't get around using an embedded 
 Unicode-TrueType font.
 

Thank you for your answer. I use the Thryomanes 1.2 font
(http://www.io.com/~hmiller/lang/) and it works fine but I got trouble with
encryption as said in bug
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21303

Is there anybody who did a patch to correct the code of the version 0.20.5
to avoid embed font to be destroyed by encryption ?
If no, is it easy for a basic java developper to do the back port from the
dev branch to the maintain branch code ? If yes, I could perhaps ask my boss
to give me few hours to do it... perhaps.
If no, I will try the iText post process.

Cedric.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Base font and russian

2004-10-12 Thread Cédric Augustin
Hello,

At first, thanks to the dev for this wonderfull tools.

I need to generate a document in english, french, german and russian. All
the text are encoded in utf-8. Everything is fine except for russian. I
already read the thread of Nuno Lopes (generating PDFs in non-english
august 08) and I have a question :

Why should I change fop configuration to use base font ?
I read on http://www.cl.cam.ac.uk/~mgk25/unicode.html#fonts that fonts that
come with X11 covers all European characters (Latin, Greek, Cyrillic, intl.
phonetic alphabet, mathematical and technical symbols, in some fonts even
Armenian, Georgian, Katakana, Thai, and more).
 
Does fop use the X11 font ? In fop configuration it says that fop need X11
to be installed.
If not, which font does fop is using ?
If yes why the fop servlet doesn't found the cyrillic char and display
 ?

I don't want to use special font and embed it in the pdf. Base font should
be enough. Russian pdf created with Acrobat are well displayed on the client
computer, so I should be able to use standard font with fop.

Config : fop 0.20.5 in a customized servlet based on the exemple servlet,
running on a Apache Tomcat/5.0.16 on Apache Tomcat/5.0.16.


Cédric Augustin
Alcyonis - Solutions Interactives 
Tel : 04 97 24 40 04 
[EMAIL PROTECTED]
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



fop image path with tomcat (servlet, baseDir)

2003-04-30 Thread Cédric Augustin
Hello,

I have a problem with servlet : no image are found.

Fop is working fine (thank you to the dev) to convert my xml to pdf from
command line. For performance reason, I am trying to do the same with
Tomcat.
I am using fop 0.20.5rc3 from cvs, Tomcat 4.1, java 1.4.1. For the test I am
on win 2000 and after I will set up a production environment on a linux box.

The build script did well the job. I copy the fop.war in the Tomcat webapps
subdir and test with a fo file and a xml/xsl files, the PDF was render with
no trouble exept the images. In Tomcat window, I saw fop who complain about
image path :

[ERROR] Error while creating area : Error with image URL:
images\logo_acro.gif (
Le chemin d'accÞs spÚcifiÚ est introuvable) and no base URL is specified

In the fo file, the src for image is relative to current dir :
fo:external-graphic height=15mm width=44mm src=images/logo_acro.gif/

I copy the images dir in webapps\fop but fop did not found it.

I tried to call directly the image from the browser and I got a servlet
error page
FopServlet Error
No 'fo' request param given.

with the following error in the logs :

2003-04-30 15:42:57 StandardContext[/fop]: Mapping contextPath='/fop' with
requestURI='/fop/fop/images/logo_acro.gif' and
relativeURI='/fop/images/logo_acro.gif'
2003-04-30 15:42:57 StandardContext[/fop]:   Trying exact match
2003-04-30 15:42:57 StandardContext[/fop]:   Trying prefix match
2003-04-30 15:42:57 StandardContext[/fop]:   Trying extension match
2003-04-30 15:42:57 StandardContext[/fop]:   Trying default match
2003-04-30 15:42:57 StandardContext[/fop]:  Mapped to servlet 'Fop' with
servlet path '/fop/images/logo_acro.gif' and path info 'null' and
update=true

So, it's look like a miss configuration of Tomcat but I don't know how and
where I should set it up. I have installed everything with default value
(except debug level).

The page http://xml.apache.org/fop/embedding.html is talking about baseDir
but how do I set it up or find it's absolut path ?

Thank you by advance for any help,
Cédric Augustin
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: external-graphic image resolution

2003-04-22 Thread Cédric Augustin
The solution I use is to set the image size 3 time less than the real size.
It works fine.

-Message d'origine-
De : Dan Check [mailto:[EMAIL PROTECTED]
Envoyé : mardi 22 avril 2003 00:39
À : [EMAIL PROTECTED]
Objet : fo:external-graphic image resolution


Hi,

I've been having some trouble displaying fo:external-graphic jpgs with 
resolutions higher than 72 dpi.  The documentation seems to indicate 
that FOP doesn't currently support resolutions higher than 72 dpi.  Has 
anyone found a way around this limitation?  I'd happily hack my version 
even if it meant losing all other image functionality, if it would mean 
I could place images at a resolution higher than 72 dpi.  Has this been 
successfully attempted?  If not, is there a thread somewhere describing 
the difficultly of doing so?

Thanks,
Dan


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]