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 Ashish Kumar <ng...@iitr.ernet.in> on 2003/10/08 16:48:36 UTC

newbie: using database to generate PDF

hi all,
         i have to use a pgSQL database to generate dynamic pdf documents 
at client side, when accessed from the server. for this i have embedded 
fop on the tomcat configured on server side. i don't how to use fop to
handle database queries, i mean how should i modify FopServlet.java &
other codes. 
         someone told me i can use apache cocoon for database access, but
then how can i generate pdf from it. i have also configured cocoon on
tomcat and am able to generate dynamic HTML documents using the
database, but can't proceed further for generating pdf documents.

thanking in advance,

ashish


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


RE: Using values from a different XML as attribute values

Posted by "Andreas L. Delmelle" <a_...@pandora.be>.
> -----Original Message-----
> From: Abhijit Junnare [mailto:mavlaabhi@yahoo.com]

> I would like to know if this is feasible and if anyone
> has tried something similar.

It certainly is feasible. I remember a vaguely similar situation where I had
to have multi-language support, and I did not want to hard-code a separate
XSLT for each language...
There are a number of possible approaches. In attachment you will find two
possible methods of dealing with this. I dl'ed them from some 'XML-tips'
website, but I seem to have lost the address...
As you can derive from the names of the zips, there should also exist a
'Method1', but for some reason I didn't find that method to be very useful.
(Sorry I can't be more specific; it's been quite a long time since I had a
look at these, but they may give you some ideas.)

I hope you find them to be of use. XSL needs to be modified if you want to
use the second XML for attribute values instead of element names.

Greetz,

Andreas

Using values from a different XML as attribute values

Posted by Abhijit Junnare <ma...@yahoo.com>.
Hi,
I know this list is mainly for FOP questions. My
question in mainly related to XSLT but I am posting
this just in case if anyone has done what I am trying
to achieve. 
I dont really know if what I have in mind is feasible.
I have a stylesheet that is used for a number of
documents. This stylesheet is used to generate PDF
using FOP. Hence I am setting various attribute values
such as page size, margins, font-size, font-family etc
in the stylesheet. 
What I would like to know is that is there a way to
get the values of these paramters from another XML
file dynamically. I mean depending on the attribute
values in the XML I want to conver to PDF I would like
to get values from another XML for the above mentioned
attributes. I think this is like opening a XML file
through XSL and accessing the content in the XML.
I would like to know if this is feasible and if anyone
has tried something similar.
Thanks,
Abhi

__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

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


RE: newbie: using database to generate PDF

Posted by JD Daniels <jd...@datatrio.com>.
You do not need to modify fop. Cocoon will do all the stages for you. You
are almost there I think. If you are generating dynamic html, you simply
have to add a transformation to your pipeline that will give you <xsl:fo>
xml. Then change the serializer from html to fo2pdf.

Try asking over on the cocoon lists... this is one of the first things new
cocoon users figure out

JD

-----Original Message-----
From: Ashish Kumar [mailto:ngelsumt@iitr.ernet.in]
Sent: Wednesday, October 08, 2003 5:49 AM
To: fop-user@xml.apache.org
Subject: {Spam?} newbie: using database to generate PDF


hi all,
         i have to use a pgSQL database to generate dynamic pdf documents
at client side, when accessed from the server. for this i have embedded
fop on the tomcat configured on server side. i don't how to use fop to
handle database queries, i mean how should i modify FopServlet.java &
other codes.
         someone told me i can use apache cocoon for database access, but
then how can i generate pdf from it. i have also configured cocoon on
tomcat and am able to generate dynamic HTML documents using the
database, but can't proceed further for generating pdf documents.

thanking in advance,

ashish


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



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