|
From: <php...@li...> - 2009-04-17 15:36:32
|
I don't think that tools exist which can translate a java example to PHP
code. But since both languages use a similar syntax, you can translate it
yourself. Just use java(...)->... to access a procedure or const within a
class and new java(...) to create an instance.
So the first statements of your code would be (provided that you have copied
the fop libs to the WEB-INF/lib within JavaBridge.war and deployed it):
<?php require_once("http://.../java/Java.inc");
$fopFactory=java("org.apache.fop.apps.FopFactory");
$foUserAgent=$fopFactory->newFoUserAgent();
...
Apr 16, 2009 8:20 nachm. schrieb am <
php...@li...>:
Hello all,
I've installed FOP 0.95 and PHP-Java-Bridge on my Unix server.
I'd like to create a PDF file from FO file using the ExampleFO2PDF.java
from
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/examples/embedding/java/embedding/ExampleFO2PDF.java?view=markup
OS: Solaris 10
Server Version: Apache/2.2.9 (Unix) mod_ssl/2.2.9 OpenSSL/0.9.7d
Tomcat : Apache Tomact/6.0.16
PHP: version 5.2.9
PHP-Java-Bridge : version 5.4.3.3
I compiled the the ExampleFO2PDF.java => ExampleFO2PDF.class
and then I created a jar file => ExampleFO2PDF.jar
AFAIK, it's possible to call the Java class from a PHP script using
PHP-Java-Bridge.
Is there anyone who already tried to create a PDF file from FO file using
the ExampleFO2PDF.java I mentioned above ?
Any help would be appreciated.
btw, I can create a PDF file using command line:
fop -fo foo.fo -pdf
foo.pdf
I cann see the pdf file from URL:
http://myhost.com:8080/fop/fop?fo=/opt/coolstack/fop/foo.fo
Al
------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today.
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
php-java-bridge-users mailing list
php...@li...
https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
|