RE: Enhancing FOP command line speed

2004-08-25 Thread Sonke Ruempler
Markus mailto:[EMAIL PROTECTED] wrote on Friday, August 13, 2004 6:19 PM:

 today i played around with tomcat and fop embedded in a servlet. looks
 promising. when i solve some small probs it could be a good way to go.
 the time to generate pdfs is much smaller than with fop on command
 line. 

Oh yeah great, i am very interested in your results.

-- 

Mit freundlichem Gru?

Sonke Ruempler
Technik

top concepts Internetmarketing GmbH
Am Steinkamp 7 - D-21684 Stade - Germany

http://www.topconcepts.deTel. +49 1805 9977 501*
mail: [EMAIL PROTECTED]Fax. +49 1805 9977 502*

SMS Versand ab 9.9 Cent: http://sms-gw.topconcepts.de

Handelsregister: AG Stade HRB 5811 - UstId: DE 213645563

*) EUR 0,12/Min. (CNS24)

-- http://www.topconcepts.de/kundenservice/faq/1/
-- http://learn.to/quote


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



Re: Enhancing FOP command line speed

2004-08-13 Thread Markus
Markus wrote:
Jeremias Maerki wrote:
Why not install Tomcat, deploy the FOP servlet [1] and then access FOP
using HTTP GET requests? Should be simple using PHP.
[1] http://xml.apache.org/fop/servlets.html
I also remember someone having posted that he has written a web service
around FOP. Look in the archives.
On 09.08.2004 11:08:05 Sonke Ruempler wrote:
Maybe someone has written a small JAVA daemon yet? I would prefer this
solution from my PHP scripts.


today i played around with tomcat and fop embedded in a servlet. looks 
promising. when i solve some small probs it could be a good way to go. 
the time to generate pdfs is much smaller than with fop on command line.

i will post my results when i am a little further
markus
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Enhancing FOP command line speed

2004-08-11 Thread Markus
Jeremias Maerki wrote:
Why not install Tomcat, deploy the FOP servlet [1] and then access FOP
using HTTP GET requests? Should be simple using PHP.
[1] http://xml.apache.org/fop/servlets.html
I also remember someone having posted that he has written a web service
around FOP. Look in the archives.
On 09.08.2004 11:08:05 Sonke Ruempler wrote:
Maybe someone has written a small JAVA daemon yet? I would prefer this
solution from my PHP scripts.

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

thanxs for this hint. i also found some fop-stuff in apache cocoon - 
maybe another approach.
but don't know, whether tomcat/cocoon is the right way - maybe only to 
test performance. our web app don't return the pdf directly to the 
browser. the pdf should be saved in the filesystem an then the user gets 
a response page and an email both having the link to download the pdf.
i also use itext to define user permissions set some document infos...

i will look around it as soon as time allows it...
markus
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Enhancing FOP command line speed

2004-08-09 Thread Chris Bowditch
Markus wrote:
snip/
so we would like to see a very fast pdf generation. our environment is 
perl on linux. whicht tipps to speed up generation? so far it seems to 
make not much differnce wheter i call fop

fop -xsl ticket.xsl -xml ticket.xml -c myconfig.xml -pdf ticket.pdf
or first produce the fo-file with xalan and then do
fop -fo ticket.fo -pdf ticket.pdf
so it seems that the xslt-transformation is not time consuming, it is 
only one page of pdf, so it should be no problem...
Thats right, the xslt will only take a small percentage of processing time 
compared with the XSL-FO formatting process. Calling FOP from command line 
each time means there is the overhead of starting the Java JVM for each 
ticket. The way around this is to write a Java program which can receive 
requests via some mechanism, e.g. JMS Queues, watching disk files, database 
tables, etc etc. And then change your perl program to send a request using 
your choosen communication method. The details of linking Java to Perl are 
well off topic for this discussion group, but you should find once completed 
that the average ticket generation time is reduced by a good margin.

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


RE: Enhancing FOP command line speed

2004-08-09 Thread Sonke Ruempler
Chris Bowditch mailto:[EMAIL PROTECTED] wrote on Monday, August
09, 2004 10:53 AM:

 ticket. The way around this is to write a Java program which
 can receive
 requests via some mechanism, e.g. JMS Queues, watching disk
 files, database
 tables, etc etc. And then change your perl program to send a request
 using your choosen communication method. The details of linking
 Java to Perl are
 well off topic for this discussion group, but you should find
 once completed
 that the average ticket generation time is reduced by a good margin.

Maybe someone has written a small JAVA daemon yet? I would prefer this
solution from my PHP scripts.

--

Soenke


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



Re: Enhancing FOP command line speed

2004-08-09 Thread Nuno Lopes
 Maybe someone has written a small JAVA daemon yet? I would prefer this
 solution from my PHP scripts.


You can call FOP from PHP:

?
$pdf = output.pdf;
$fo = input.fo;
$options = array($fo,$pdf);

 $java = new Java(org.apache.fop.apps.CommandLine, $options);
$java-run();
?


You have a good tutorial here: http://xmlvortrag.bitflux.ch/

The support for Java is expected to be improved in PHP 5.1.


But caution because FOP wastes too many memory. Building the PHP manual
takes about 1 GB of memory :)

Nuno


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



RE: Enhancing FOP command line speed

2004-08-09 Thread Sönke Ruempler
Nuno Lopes mailto:[EMAIL PROTECTED] wrote on Monday, August 09, 2004
12:52 PM:

  $java = new Java(org.apache.fop.apps.CommandLine, $options);
 $java-run();

I know, but the PHP-JAVA extension in EXPERIMENTAL and unstable, addational
it's not caching and the VM has to be started everytime, too. So no speed
enhancement to direct command line and not as stable as system call.



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



Re: Enhancing FOP command line speed

2004-08-09 Thread Jeremias Maerki
Why not install Tomcat, deploy the FOP servlet [1] and then access FOP
using HTTP GET requests? Should be simple using PHP.

[1] http://xml.apache.org/fop/servlets.html

I also remember someone having posted that he has written a web service
around FOP. Look in the archives.

On 09.08.2004 11:08:05 Sonke Ruempler wrote:
 Maybe someone has written a small JAVA daemon yet? I would prefer this
 solution from my PHP scripts.


Jeremias Maerki


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



Re: Enhancing FOP command line speed

2004-08-05 Thread Markus
Sonke Ruempler wrote:
There is a PHP PEAR module (XML_fo2pdf) that utilizes the java engine and
fop, but the JAVA extension of PHP is unstable and does no caching. I was
thinking of a Deamon that processes the .fo file ...

Once you find out how that can be done, I would then
move away from a FOP command line to an FOP-embedded
program (see http://xml.apache.org/fop/embedding.html
for examples) that you can keep active for your
multiple documents.

I don't know any stable solution and caching embedding solution for PHP :-(
any solutions or further hints so far?
we are setting up a web application which allows our customers to buy 
online tickets to events from our event calender. the ticket is produced 
as pdf and the customer can print it out at home. the generation of the 
tickets lasts a few seconds, we are using several komplex svg-graphics 
and barcode and other stuff to produce a not-so-easy-to-fake-ticket.

so we would like to see a very fast pdf generation. our environment is 
perl on linux. whicht tipps to speed up generation? so far it seems to 
make not much differnce wheter i call fop

fop -xsl ticket.xsl -xml ticket.xml -c myconfig.xml -pdf ticket.pdf
or first produce the fo-file with xalan and then do
fop -fo ticket.fo -pdf ticket.pdf
so it seems that the xslt-transformation is not time consuming, it is 
only one page of pdf, so it should be no problem...

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


Re: Enhancing FOP command line speed

2004-07-29 Thread Glen Mazza
I would go to the PHP site/ML's/FAQ's, etc., and look
at how to keep a Java application active in memory for
your PHP calls.

Once you find out how that can be done, I would then
move away from a FOP command line to an FOP-embedded
program (see http://xml.apache.org/fop/embedding.html
for examples) that you can keep active for your
multiple documents.  

Glen


--- Sönke_Ruempler [EMAIL PROTECTED] wrote:

 Hi,
 
 Anyone knows how to speed up FOP from the command
 line? Atm I call the
 fop.sh from a PHP script to generate the PDF and so
 everytime the (slow ;) )
 Java Runtime must be started.
 
 --
 
 Sönke
 
 

-
 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]



RE: Enhancing FOP command line speed

2004-07-29 Thread Sonke Ruempler
Glen Mazza wrote:
 I would go to the PHP site/ML's/FAQ's, etc., and look
 at how to keep a Java application active in memory for
 your PHP calls.

There is a PHP PEAR module (XML_fo2pdf) that utilizes the java engine and
fop, but the JAVA extension of PHP is unstable and does no caching. I was
thinking of a Deamon that processes the .fo file ...

 Once you find out how that can be done, I would then
 move away from a FOP command line to an FOP-embedded
 program (see http://xml.apache.org/fop/embedding.html
 for examples) that you can keep active for your
 multiple documents.

I don't know any stable solution and caching embedding solution for PHP :-(

-- 

Sonke


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