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 mi...@honeywell.com on 2002/08/19 22:45:47 UTC
Converting to PDF in ASP
We have an ASP project at the company I'm working for which needs to print
some reports. Since I just used FOP for a java/servlet project (and this
company is a java shop), I would like to use the XML->XSL-FO->PDF method to
do the reports. I've seen many activeX PDF converters for ASP, but I
haven't seen anyway to use FOP or anything like FOP for an ASP webapp. I
don' t want to use the activeX controls because this project will probably
be converted to java in the future and I would like to reuse the XSL files.
Anyone have any thoughts on the best way to go?
Thanks, Mike
Re: Converting to PDF in ASP
Posted by Balaji Loganathan <ba...@yahoo.com>.
Hi Mike,
I have pasted the previous discussion below on this
topic,may be this could help you.
Regards
Balaji
***********Message*************
Subject: Re: Using FOP on a ASP.NET server to convert
FO to PDF
From: "Wim Sandra" <wi...@quadrat.be>
===
I've integrated FOP in a ASP.NET server by
implementing a COM
component.
The COM components export a very simple interface with
a method that
takes
some XML data, a XSL-FO stylesheet and writes a PDF
file (or writes the
PDF
data to some memory). The COM component calls the
FOP java methods
with
JNI (Java Native Interface).
Ultimately, in your C# ASP.NET application, we more or
less write:
FOPLib.Fop fop = new FOPLib.Fop();
fop.fop2File(xmlData,xsltData,outputFileName);
Response.Redirect(outputFileName);
or
FOPLib.Fop fop = new FOPLib.Fop();
uint numBytes = fop.fop2Memory(xmlData,xsltData);
byte [] bytes = new byte [numBytes];
renderer.read(bytes);
Response.Expires = 0;
Response.Buffer = true;
Response.ContentType = @"application/pdf";
Response.BinaryWrite(bytes);
Response.End();
Wim
"Balaji Loganathan" <ba...@yahoo.com> wrote in
message
news:mailman.1024218060.21749.fop@basebeans.com...
> Hi,
> Did u able to install Tomcat with IIS.if so then
> integrating FOP with .NET server is easy.
> My suggestion is ,
> 1.Try to install Tomcat and run some sample servlet
> examples.
> 2.Try to configure FOP with Tomcat so that u can run
> the FopServlet(a sample servlet which convert FO/XSL
> to pdf)from the browser.
> 3.Try to configure Tomcat with IIS
> 4.Then u can do the same with .NET server.
>
> Documentation/steps/guidelines are available from
> Tomcat,FOP packages.
> Just give another try.It will work.
>
> Rgds
> Balaji
>
> http://www.sold.com.au - SOLD.com.au
> - Find yourself a bargain!
--- mike.witt@honeywell.com wrote: > We have an ASP
project at the company I'm working
> for which needs to print
> some reports. Since I just used FOP for a
> java/servlet project (and this
> company is a java shop), I would like to use the
> XML->XSL-FO->PDF method to
> do the reports. I've seen many activeX PDF
> converters for ASP, but I
> haven't seen anyway to use FOP or anything like FOP
> for an ASP webapp. I
> don' t want to use the activeX controls because this
> project will probably
> be converted to java in the future and I would like
> to reuse the XSL files.
>
> Anyone have any thoughts on the best way to go?
>
> Thanks, Mike
>
http://digital.yahoo.com.au - Yahoo! Digital How To
- Get the best out of your PC!