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 Fischer Tibor <fi...@freemail.hu> on 2002/02/28 14:50:14 UTC

calling fop from java

hi

i would like to call the fop's transformation procedure from a running 
java application, to create pdf  realtime

how is it possible??
what method sholud i call??

Thanks,
Fishy




Re: calling fop from java

Posted by Fischer Tibor <fi...@freemail.hu>.
and what i forgot again, i only get 3 existing filenames (xml, xsl, and 
output pdf)

Fishy
Fischer Tibor wrote:

> that's ok,
> sorry but i didn't said, that i have an xml, and an xsl file, and i 
> have to generate the pdf from them
>
> Fishy
>
> Alexandre Denes dos Santos wrote:
>
>> Use:
>>
>> Driver driver = new Driver(InputStream in, OutputStream out);
>> driver.setRenderer(Driver.RENDER_PDF);
>>
>> driver.run();
>>
>> where in is the inputStream to the fo file that you will render and
>> out is the outputstream where the pdf content will be write to.
>>
>> The package is org.apache.fop.apps.
>>
>> Hope that helps.
>>
>> Denes
>>
>>
>>
>> ----- Original Message ----- From: "Fischer Tibor" <fi...@freemail.hu>
>> To: <fo...@xml.apache.org>
>> Sent: Thursday, February 28, 2002 10:50 AM
>> Subject: calling fop from java
>>
>>
>>> hi
>>>
>>> i would like to call the fop's transformation procedure from a 
>>> running java application, to create pdf  realtime
>>>
>>> how is it possible??
>>> what method sholud i call??
>>>
>>> Thanks,
>>> Fishy
>>>
>>>
>>
>>
>>
>>
>>
>
>
>
>
>
>



Re: calling fop from java

Posted by Alexandre Denes dos Santos <de...@visionnaire.com.br>.
I´m working in something like that.

I have an servlet filter that calls a JSP page that will return an xml file
with a set of pre-defined tags. This xml file will be transformed into a fo
stream with xalan using a xsl file with the fo definition of my tags. This
fo stream will be then rendered with fop. (I hope that the English is
correct...)

I'm sending the code for the filter, the xsl that I have and a xml example
for my tags. It´s is working, but the tags are still very limited because
I´m still in the begining of the project.

I´m also working in a wysiwyg tool to create the xsl file.

Hope that helps.

Denes

----- Original Message -----
From: "Fischer Tibor" <fi...@freemail.hu>
To: <fo...@xml.apache.org>
Sent: Thursday, February 28, 2002 11:06 AM
Subject: Re: calling fop from java


> that's ok,
> sorry but i didn't said, that i have an xml, and an xsl file, and i have
> to generate the pdf from them
>
> Fishy
>
> Alexandre Denes dos Santos wrote:
>
> >Use:
> >
> >Driver driver = new Driver(InputStream in, OutputStream out);
> >driver.setRenderer(Driver.RENDER_PDF);
> >
> >driver.run();
> >
> >where in is the inputStream to the fo file that you will render and
> >out is the outputstream where the pdf content will be write to.
> >
> >The package is org.apache.fop.apps.
> >
> >Hope that helps.
> >
> >Denes
> >
> >
> >
> >----- Original Message -----
> >From: "Fischer Tibor" <fi...@freemail.hu>
> >To: <fo...@xml.apache.org>
> >Sent: Thursday, February 28, 2002 10:50 AM
> >Subject: calling fop from java
> >
> >
> >>hi
> >>
> >>i would like to call the fop's transformation procedure from a running
> >>java application, to create pdf  realtime
> >>
> >>how is it possible??
> >>what method sholud i call??
> >>
> >>Thanks,
> >>Fishy
> >>
> >>
> >
> >
> >
> >
> >
>

Re: calling fop from java

Posted by Fischer Tibor <fi...@freemail.hu>.
that's ok,
sorry but i didn't said, that i have an xml, and an xsl file, and i have 
to generate the pdf from them

Fishy

Alexandre Denes dos Santos wrote:

>Use:
>
>Driver driver = new Driver(InputStream in, OutputStream out);
>driver.setRenderer(Driver.RENDER_PDF);
>
>driver.run();
>
>where in is the inputStream to the fo file that you will render and
>out is the outputstream where the pdf content will be write to.
>
>The package is org.apache.fop.apps.
>
>Hope that helps.
>
>Denes
>
>
>
>----- Original Message ----- 
>From: "Fischer Tibor" <fi...@freemail.hu>
>To: <fo...@xml.apache.org>
>Sent: Thursday, February 28, 2002 10:50 AM
>Subject: calling fop from java
>
>
>>hi
>>
>>i would like to call the fop's transformation procedure from a running 
>>java application, to create pdf  realtime
>>
>>how is it possible??
>>what method sholud i call??
>>
>>Thanks,
>>Fishy
>>
>>
>
>
>
>
>



Re: calling fop from java

Posted by Alexandre Denes dos Santos <de...@visionnaire.com.br>.
Use:

Driver driver = new Driver(InputStream in, OutputStream out);
driver.setRenderer(Driver.RENDER_PDF);

driver.run();

where in is the inputStream to the fo file that you will render and
out is the outputstream where the pdf content will be write to.

The package is org.apache.fop.apps.

Hope that helps.

Denes



----- Original Message ----- 
From: "Fischer Tibor" <fi...@freemail.hu>
To: <fo...@xml.apache.org>
Sent: Thursday, February 28, 2002 10:50 AM
Subject: calling fop from java


> hi
> 
> i would like to call the fop's transformation procedure from a running 
> java application, to create pdf  realtime
> 
> how is it possible??
> what method sholud i call??
> 
> Thanks,
> Fishy
> 
>