Re: Struts2 - Html to PDF

2010-07-24 Thread Miguel
FOP is good, but it transforms from XML-FO to PDF (and lots of other
target formats).
If you want to tranform html to pdf you need a 3 stage process:
first you write XHTML with CSS using what ever you have/know/like.
Then you transform it to XML-FO using CSS2XSLFO
(www.re.be/css2xslfo/index.xhtml)
Then you transform this to PDF using FOP (or others front-ends)

Please be warned that this combination is very flexible but has very
odd limitations.
For reporting uses, you may want also to look jasper reports and BIRT
that also exports to PDF.


Si quieres ser más positivo, pierde un electrón
Miguel Ruiz Velasco Sobrino



On Sat, Jul 24, 2010 at 09:08, Martin Gainty  wrote:
>
> i dont know how Crystal can ingest either XSD schema entities or POJOs..maybe 
> someone out there knows of a converter?
>
>
> FOP transform is the best solution offered
>
> http://xmlgraphics.apache.org/fop/
>
>
>
> Good Call!
> Martin
> __
> Verzicht und Vertraulichkeitanmerkung
>
> Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
> sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
> oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich 
> dem Austausch von Informationen und entfaltet keine rechtliche 
> Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen 
> wir keine Haftung fuer den Inhalt uebernehmen.
>
>
>
>> Date: Fri, 23 Jul 2010 17:33:23 -0400
>> Subject: Re: Struts2 - Html to PDF
>> From: w...@wantii.com
>> To: user@struts.apache.org
>>
>> I'd assume it's possible, but probably not the best choice... I would
>> take a look at doing either a Jasper report or using Apache FOP. The
>> choice will have to do with the nature of the PDF you are trying to
>> generate. Jasper is a reporting platform... Think of Crystal Reports,
>> there is a report designer, you then back the report with data and
>> render. Jasper uses iText to generate PDFs, and it will let you create
>> more of a "document" than a bunch of code.
>>
>> If your output will be hard to model in a traditional reporting
>> platform, then take a look at Apache FOP. It's very complicated, but
>> think of it this way -
>>
>> You start with XML modelling your data, then pass it through a
>> transform that kicks out XSL-FO, then you have Apache FOP turn it into
>> a PDF. I don't have any real experience with it, so I might be giving
>> you bad information (and hope someone will correct me). But, in this
>> scenario, you are generating XML which represents the data you are
>> passing to the output. The transform is done using XSLT? Which is
>> another standard. What you generate is an XSL-FO document. This
>> document can be rendered as a PDF by FOP. Although it's a more
>> complicated process than the first choice, it does add some
>> flexibility since you can drop-in replace different components (the
>> transformer, the FO-to-PDF converter, probably), plus, you can create
>> other XSLTs that generate other output. With Jasper, you'll probably
>> be locked into PDF, HTML and Excel (CSV).
>>
>> -Wes
>>
>> On Fri, Jul 23, 2010 at 4:43 PM, CRANFORD, CHRIS
>>  wrote:
>> > Is it possible to extend the default ServletDispatcherResult to parse
>> > the HTML output and pass the result content to the browser as a PDF
>> > document?  Or is there a better approach to doing this?  What I want to
>> > be able to do is to allow easy creation of PDF documents from HTML
>> > content.  Presently I am looking to use iText but this isn't a firm
>> > choice and another option that may work better is possible.
>> >
>> > Chris
>> >
>> >
>> > -
>> > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> > For additional commands, e-mail: user-h...@struts.apache.org
>> >
>> >
>>
>>
>>
>> --
>> Wes Wannemacher
>>
>> Head Engineer, WanTii, Inc.
>> Need Training? Struts, Spring, Maven, Tomcat...
>> Ask me for a quote!
>>
>> -
>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> For additional commands, e-mail: user-h...@struts.apache.org
>>
>
> _
> The New Busy is not the too busy. Combine all your e-mail accounts with 
> Hotmail.
> http://www.windowslive.com/campaign/thenewbusy?tile=multiaccount&ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_4

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



RE: Struts2 - Html to PDF

2010-07-24 Thread Martin Gainty

i dont know how Crystal can ingest either XSD schema entities or POJOs..maybe 
someone out there knows of a converter?


FOP transform is the best solution offered

http://xmlgraphics.apache.org/fop/

 

Good Call!
Martin 
__ 
Verzicht und Vertraulichkeitanmerkung

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.

 

> Date: Fri, 23 Jul 2010 17:33:23 -0400
> Subject: Re: Struts2 - Html to PDF
> From: w...@wantii.com
> To: user@struts.apache.org
> 
> I'd assume it's possible, but probably not the best choice... I would
> take a look at doing either a Jasper report or using Apache FOP. The
> choice will have to do with the nature of the PDF you are trying to
> generate. Jasper is a reporting platform... Think of Crystal Reports,
> there is a report designer, you then back the report with data and
> render. Jasper uses iText to generate PDFs, and it will let you create
> more of a "document" than a bunch of code.
> 
> If your output will be hard to model in a traditional reporting
> platform, then take a look at Apache FOP. It's very complicated, but
> think of it this way -
> 
> You start with XML modelling your data, then pass it through a
> transform that kicks out XSL-FO, then you have Apache FOP turn it into
> a PDF. I don't have any real experience with it, so I might be giving
> you bad information (and hope someone will correct me). But, in this
> scenario, you are generating XML which represents the data you are
> passing to the output. The transform is done using XSLT? Which is
> another standard. What you generate is an XSL-FO document. This
> document can be rendered as a PDF by FOP. Although it's a more
> complicated process than the first choice, it does add some
> flexibility since you can drop-in replace different components (the
> transformer, the FO-to-PDF converter, probably), plus, you can create
> other XSLTs that generate other output. With Jasper, you'll probably
> be locked into PDF, HTML and Excel (CSV).
> 
> -Wes
> 
> On Fri, Jul 23, 2010 at 4:43 PM, CRANFORD, CHRIS
>  wrote:
> > Is it possible to extend the default ServletDispatcherResult to parse
> > the HTML output and pass the result content to the browser as a PDF
> > document?  Or is there a better approach to doing this?  What I want to
> > be able to do is to allow easy creation of PDF documents from HTML
> > content.  Presently I am looking to use iText but this isn't a firm
> > choice and another option that may work better is possible.
> >
> > Chris
> >
> >
> > -
> > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> > For additional commands, e-mail: user-h...@struts.apache.org
> >
> >
> 
> 
> 
> -- 
> Wes Wannemacher
> 
> Head Engineer, WanTii, Inc.
> Need Training? Struts, Spring, Maven, Tomcat...
> Ask me for a quote!
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
> 
  
_
The New Busy is not the too busy. Combine all your e-mail accounts with Hotmail.
http://www.windowslive.com/campaign/thenewbusy?tile=multiaccount&ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_4

Re: Struts2 - Html to PDF

2010-07-23 Thread Burton Rhodes
Absolutely look into PD4ML. I've tried several and its the best one
I've found and most reliable.

On 7/23/10, CRANFORD, CHRIS  wrote:
> Is it possible to extend the default ServletDispatcherResult to parse
> the HTML output and pass the result content to the browser as a PDF
> document?  Or is there a better approach to doing this?  What I want to
> be able to do is to allow easy creation of PDF documents from HTML
> content.  Presently I am looking to use iText but this isn't a firm
> choice and another option that may work better is possible.
>
> Chris
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>

-- 
Sent from my mobile device

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Struts2 - Html to PDF

2010-07-23 Thread Wes Wannemacher
I'd assume it's possible, but probably not the best choice... I would
take a look at doing either a Jasper report or using Apache FOP. The
choice will have to do with the nature of the PDF you are trying to
generate. Jasper is a reporting platform... Think of Crystal Reports,
there is a report designer, you then back the report with data and
render. Jasper uses iText to generate PDFs, and it will let you create
more of a "document" than a bunch of code.

If your output will be hard to model in a traditional reporting
platform, then take a look at Apache FOP. It's very complicated, but
think of it this way -

You start with XML modelling your data, then pass it through a
transform that kicks out XSL-FO, then you have Apache FOP turn it into
a PDF. I don't have any real experience with it, so I might be giving
you bad information (and hope someone will correct me). But, in this
scenario, you are generating XML which represents the data you are
passing to the output. The transform is done using XSLT? Which is
another standard. What you generate is an XSL-FO document. This
document can be rendered as a PDF by FOP. Although it's a more
complicated process than the first choice, it does add some
flexibility since you can drop-in replace different components (the
transformer, the FO-to-PDF converter, probably), plus, you can create
other XSLTs that generate other output. With Jasper, you'll probably
be locked into PDF, HTML and Excel (CSV).

-Wes

On Fri, Jul 23, 2010 at 4:43 PM, CRANFORD, CHRIS
 wrote:
> Is it possible to extend the default ServletDispatcherResult to parse
> the HTML output and pass the result content to the browser as a PDF
> document?  Or is there a better approach to doing this?  What I want to
> be able to do is to allow easy creation of PDF documents from HTML
> content.  Presently I am looking to use iText but this isn't a firm
> choice and another option that may work better is possible.
>
> Chris
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>



-- 
Wes Wannemacher

Head Engineer, WanTii, Inc.
Need Training? Struts, Spring, Maven, Tomcat...
Ask me for a quote!

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Struts2 - Html to PDF

2010-07-23 Thread CRANFORD, CHRIS
Is it possible to extend the default ServletDispatcherResult to parse
the HTML output and pass the result content to the browser as a PDF
document?  Or is there a better approach to doing this?  What I want to
be able to do is to allow easy creation of PDF documents from HTML
content.  Presently I am looking to use iText but this isn't a firm
choice and another option that may work better is possible.

Chris


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org