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 Al Dancer <re...@yahoo.com> on 2009/04/16 15:16:11 UTC

create PDF file using ExampleFO2PDF.java

Hello all,

I've installed FOP 0.95 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

Since, I've installed PHP-Java-Bridge, I can create a PHP script to call the Java class.
Is there anyone who already tried to create a PDF file from FO file using PHP ?

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



      

Re: create PDF file using ExampleFO2PDF.java

Posted by Sam Fuqua <sa...@gmail.com>.
Though I haven't used PHP for this, is there any reason why you can't
simply use the example as a servlet on your Tomcat server?  It would
be very easy to pass the location of the fo to the servlet if that's
what you're trying to do, rather than use php to make Java calls.
Though you probably have your reasons.

On Thu, Apr 16, 2009 at 9:16 AM, Al Dancer <re...@yahoo.com> wrote:
> Hello all,
>
> I've installed FOP 0.95 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
>
> Since, I've installed PHP-Java-Bridge, I can create a PHP script to call the
> Java class.
> Is there anyone who already tried to create a PDF file from FO file using
> PHP ?
>
> 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
>
>



-- 
Sam Fuqua
ΣΝ ΘΗ 454

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org