Hi Mike
 
I originally sent the pdf as an attachment as well, but found that if the
user clicked "save" instead of "open" the pdf wasn't saved correctly and
couldn't be opened. If the pdf was opened straight away and then saved it
saved fine. Does your implementation not have this problem? I would be
interested to see how you are doing it. :)
 
I haven't had a problem with IE opening the pdf file even though the url
doesn't have a .pdf on the end. It opens fine in the browser window.
Netscape still prompts you to choose "open" or "save" but when you save
straight away from Netscape it works fine. (Netscape worked fine the other
way too.)
 
Oh, and I return null from my action just like Todd suggests.
 
Lisa

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: 16 August 2002 16:43
To: [EMAIL PROTECTED]
Subject: RE: Help - xml to pdf using struts


Hi Lisa,
 
That looks similar to my solution.  The biggest problem I had was with
getting IE to display the PDF inline without a PDF in the URL  Using a
Struts action, I wasn't able to get the URL to change at the appropriate
time with a redirect.  In the end, I sent the pdf as an attachment which
gives the open/save prompt.  Were you able to get around this problem?
 
Thanks, Mike

-----Original Message-----
From: Lisa van Gelder [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 15, 2002 4:52 AM
To: 'Struts Users Mailing List'
Subject: RE: Help - xml to pdf using struts



Here is the bit of my action that deals with the pdf creation. 

First I transform xml to fo using xsl (and Xalan). The result is written to
an InputSteam, which is passed into FOP. The result from FOP is then written
out the client and the content type is set to "application/pdf".

HTH 

Lisa 

-----Original Message----- 
From: Zimmer, Robin (SSABSA) [ mailto:[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> ] 
Sent: 15 August 2002 09:37 
To: 'Struts Users Mailing List' 
Subject: RE: Help - xml to pdf using struts 


Lisa, That sounds can you provide an example action please. 

-----Original Message----- 
From: Lisa van Gelder [ mailto:[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> ] 
Sent: Thursday, 15 August 2002 6:01 PM 
To: 'Struts Users Mailing List' 
Subject: RE: Help - xml to pdf using struts 


I do the xml -> fo -> pdf transformation in an Action, and then stream the 
result straight back to the browser. 

Lisa 

-----Original Message----- 
From: Zimmer, Robin (SSABSA) [ mailto:[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> ] 
Sent: 15 August 2002 09:28 
To: 'Struts Users Mailing List' 
Subject: RE: Help - xml to pdf using struts 


Thanks for getting back to me. I appreciate that I have to have xsl:fo to 
transform the xml, but how best to render this using jsp??? Or do I need a 
servlet??? 

-----Original Message----- 
From: David WIlkinson [ mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> ] 
Sent: Thursday, 15 August 2002 5:57 PM 
To: 'Struts Users Mailing List' 
Subject: RE: Help - xml to pdf using struts 


We had to address a similar issue of creating pdf's from xml and found 
that it can be done in a simple way using xsl:fo to transform the xml. 

Check out http://xml.apache.org/fop/index.html
<http://xml.apache.org/fop/index.html>  for more info. 


-----Original Message----- 
From: Zimmer, Robin (SSABSA) [ mailto:[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> ] 
Sent: 15 August 2002 08:13 
To: '[EMAIL PROTECTED]' 
Subject: Help - xml to pdf using struts 

I am in the last stages of implementating a Struts application. I now 
have 
to complete the reporting side. This basically consists of displaying 
xml 
output as HTML or PDF. I have the HTML side covered (I am using jakarta 
XTags) but how do I render an xml to fo transformation to pdf by using 
struts. I am aware of stxx but as far as I can see you have to override 
the 
actionservlet etc and this seems an overhead for what is a small part of 
the 
app. Can anyone please give some suggestions. 

-- 
To unsubscribe, e-mail: 
< mailto:[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> > 
For additional commands, e-mail: 
< mailto:[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> > 





-- 
To unsubscribe, e-mail: 
< mailto:[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> > 
For additional commands, e-mail: 
< mailto:[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> > 

-- 
To unsubscribe, e-mail: 
< mailto:[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> > 
For additional commands, e-mail: 
< mailto:[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> > 

-- 
To unsubscribe, e-mail:   <
mailto:[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> > 
For additional commands, e-mail: <
mailto:[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> > 



Reply via email to