Re: [OT] RTF & PDF export options

2004-07-20 Thread Juan Alvarado
I know you mentioned open source tools, but I wasn't 100% sure if you were limited to 
open source. Windward Reports seems like a tool for the job. 
http://www.windwardreports.com. It's not free and in fact it's pretty expensive.
 
We are leaning towards using this tool because of the ease of use they advertise. 
Supposedly you create a template in Word and you then can output to all types of 
different formats. I am curious to know if anyone has any experience with this tool 
before we shell out the two grand it costs.
 
Thanks.

"Barnett, Brian W." <[EMAIL PROTECTED]> wrote:
Any suggestions for converting html to RTF and PDF inside an action class
and then sending the RTF or PDF back to the client?



Open source tools, code snippets, tips & tricks, etc. ??



Thanks a bunch.



Brian Barnett



-
Do you Yahoo!?
Vote for the stars of Yahoo!'s next ad campaign!

Re: [OT] RTF & PDF export options

2004-07-20 Thread Wendy Smoak
From: "Barnett, Brian W." <[EMAIL PROTECTED]>
> Forgive my naivety, Wendy, but what are the benefits of redirecting to a
Servlet?

My reasons, in no particular order...
- I wanted a ".pdf" URL showing in the browser address line
- the redirect lets me show a 'please wait' page
- the sample code I started with was already a Servlet
- it's not tied to Struts.  It looks at something in the session, reads
stuff from the database and spits out a PDF.

If it works for you from an Action, I won't argue that you should rewrite it
as a Servlet.

-- 
Wendy Smoak


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



RE: [OT] RTF & PDF export options

2004-07-20 Thread William T Hansley
I've used iText for straight PDF generation, but I don't know how 
applicable it is to your problem.  It's a great tool with TONS of 
examples. http://www.lowagie.com/iText/
-Bill







"Barnett, Brian W." <[EMAIL PROTECTED]>
07/20/2004 12:07 PM
Please respond to "Struts Users Mailing List"
 
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
    cc: 
Subject:RE: [OT] RTF & PDF export options


I've been exposed to JasperReports, but in this case, I think it would be
overkill for what I need. Thanks for the idea.

-Original Message-
From: Coyne, Jimmy [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 20, 2004 3:23 AM
To: 'Struts Users Mailing List'
Subject: RE: [OT] RTF & PDF export options

Did you have a look at JasperReports (
http://jasperreports.sourceforge.net/index.html) ? 
Jimmy


> -Original Message-
> From: Barnett, Brian W. [mailto:[EMAIL PROTECTED]
> Sent: 19 July 2004 23:22
> To: '[EMAIL PROTECTED]'
> Subject: [OT] RTF & PDF export options
>
>
> Any suggestions for converting html to RTF and PDF inside an action 
class
> and then sending the RTF or PDF back to the client?
>
>
>
> Open source tools, code snippets, tips & tricks, etc. ??
>
>
>
> Thanks a bunch.
>
>
>
> Brian Barnett
>
>


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

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

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




RE: [OT] RTF & PDF export options

2004-07-20 Thread Barnett, Brian W.
I've been exposed to JasperReports, but in this case, I think it would be
overkill for what I need. Thanks for the idea.

-Original Message-
From: Coyne, Jimmy [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 20, 2004 3:23 AM
To: 'Struts Users Mailing List'
Subject: RE: [OT] RTF & PDF export options

Did you have a look at JasperReports (
http://jasperreports.sourceforge.net/index.html) ? 
Jimmy


> -Original Message-
> From: Barnett, Brian W. [mailto:[EMAIL PROTECTED]
> Sent: 19 July 2004 23:22
> To: '[EMAIL PROTECTED]'
> Subject: [OT] RTF & PDF export options
>
>
> Any suggestions for converting html to RTF and PDF inside an action class
> and then sending the RTF or PDF back to the client?
>
>
>
> Open source tools, code snippets, tips & tricks, etc. ??
>
>
>
> Thanks a bunch.
>
>
>
> Brian Barnett
>
>


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

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

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



RE: [OT] RTF & PDF export options

2004-07-20 Thread Barnett, Brian W.
Forgive my naivety, Wendy, but what are the benefits of redirecting to a
Servlet?

-Original Message-
From: Wendy Smoak [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 19, 2004 4:46 PM
To: Struts Users Mailing List
Subject: Re: [OT] RTF & PDF export options

From: "Barnett, Brian W." <[EMAIL PROTECTED]>
> Any suggestions for converting html to RTF and PDF inside an action
> class and then sending the RTF or PDF back to the client?

iText, but I don't do it in an Action, I redirect to a Servlet whose job it
is to output the PDF bytes.

-- 
Wendy Smoak


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

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



RE: [OT] RTF & PDF export options

2004-07-20 Thread Coyne, Jimmy
Did you have a look at JasperReports (
http://jasperreports.sourceforge.net/index.html) ? 
Jimmy


> -Original Message-
> From: Barnett, Brian W. [mailto:[EMAIL PROTECTED]
> Sent: 19 July 2004 23:22
> To: '[EMAIL PROTECTED]'
> Subject: [OT] RTF & PDF export options
>
>
> Any suggestions for converting html to RTF and PDF inside an action class
> and then sending the RTF or PDF back to the client?
>
>
>
> Open source tools, code snippets, tips & tricks, etc. ??
>
>
>
> Thanks a bunch.
>
>
>
> Brian Barnett
>
>


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

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



RE: [OT] RTF & PDF export options

2004-07-20 Thread Daniel Perry
fop - http://xml.apache.org/fop/index.html

In my opinion better than iText - gives a bit more control.  I had problems
with layout in iText - it adds funny paragraph spacing (especially with big
fonts).  For fop - generate an XML file with data, write some XSL to
translate data into fop xml, and then process. Can create one xml file, one
xsl file, and translate it to what ever you want!

Says it doesnt support rtf yet... "This is currently not integrated with FOP
but it will soon."  Might be worth trying their mailing lists to see what's
happening with it.

With iText, you generate the whole thing programatically.

With iText or fop it's easy to do from an action:


public ActionForward execute(
ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws IOException {


ByteArrayOutputStream outPDF = null;

try {
//... generate data here
outPDF = ...

// set response headers
response.setHeader("Cache-Control", "max-age=60");
response.setContentType("application/pdf");


StringBuffer cd = new StringBuffer();
cd.append("inline");
cd.append("; filename=");
cd.append("whatever");
cd.append(".pdf");
response.setHeader("Content-disposition", cd.toString());
response.setContentLength(outPDF.size());

// send pdf data
ServletOutputStream sos;
sos = response.getOutputStream();
outPDF.writeTo(sos);
sos.flush();

// return null so it just outputs data (no forward)
return null;
}


Hope that helps,

Daniel.


> -Original Message-
> From: Barnett, Brian W. [mailto:[EMAIL PROTECTED]
> Sent: 19 July 2004 23:22
> To: '[EMAIL PROTECTED]'
> Subject: [OT] RTF & PDF export options
>
>
> Any suggestions for converting html to RTF and PDF inside an action class
> and then sending the RTF or PDF back to the client?
>
>
>
> Open source tools, code snippets, tips & tricks, etc. ??
>
>
>
> Thanks a bunch.
>
>
>
> Brian Barnett
>
>


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



RE: [OT] RTF & PDF export options

2004-07-19 Thread Danilo Gurovich
It's a recipe in "Struts Recipes" (Manning --  publishing soon).  If you
contact George Franciscus through Manning he might give you some advice.

Danilo Gurovich
Manager, Web Development
LowerMyBills.com
[EMAIL PROTECTED]
2401 Colorado Ave., 2nd Floor 
Santa Monica, CA 90404
(310) 998-6412

 


-Original Message-
From: Barnett, Brian W. [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 19, 2004 3:22 PM
To: '[EMAIL PROTECTED]'
Subject: [OT] RTF & PDF export options

Any suggestions for converting html to RTF and PDF inside an action
class
and then sending the RTF or PDF back to the client?

 

Open source tools, code snippets, tips & tricks, etc. ??

 

Thanks a bunch.

 

Brian Barnett


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



Re: [OT] RTF & PDF export options

2004-07-19 Thread Nick Heudecker
Brian:
I'm guessing that you can do this with iText.  It has RTF and PDF 
writers, and I think you can use the RTF as the source doc for the 
output PDF.

FYI, if you're running iText on a headless server, you'll need to set 
java.awt.headless=true.  This works for JDK 1.4.x.


Barnett, Brian W. wrote:
Any suggestions for converting html to RTF and PDF inside an action class
and then sending the RTF or PDF back to the client?
 

Open source tools, code snippets, tips & tricks, etc. ??
 

Thanks a bunch.
 

Brian Barnett


--
Nick Heudecker
System Mobile, Inc.
Email: [EMAIL PROTECTED]
Phone: 312.420.8217
Web: http://www.systemmobile.com
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [OT] RTF & PDF export options

2004-07-19 Thread Wendy Smoak
From: "Barnett, Brian W." <[EMAIL PROTECTED]>
> Any suggestions for converting html to RTF and PDF inside an action
> class and then sending the RTF or PDF back to the client?

iText, but I don't do it in an Action, I redirect to a Servlet whose job it
is to output the PDF bytes.

-- 
Wendy Smoak


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



Re: [OT] RTF & PDF export options

2004-07-19 Thread Axel Stahlhut
Barnett, Brian W. wrote:
Any suggestions for converting html to RTF and PDF inside an action class
and then sending the RTF or PDF back to the client?
 

Open source tools, code snippets, tips & tricks, etc. ??
 

Thanks a bunch.
 

Brian Barnett

Check iText (http://www.lowagie.com/iText/), it's fast, reliable and has 
got a lot of features for pdf you'll like. The documentation is good and 
first of all, it's free.

Regards
Axel

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