myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Werner Punz <we...@gmx.at>
Subject Re: AW: Re: AW: Re: What PDF library or framework to create PDF on the fly-->iText?
Date Wed, 14 Dec 2005 19:06:37 GMT
Actually no, and yes...
The problem is, PDF is a printing target (sort of an intermediate printer)
Thus if the client itself, which is the browser can print to PDF in one 
way or the other, then you can push the form directly into PDF,
but the way I see it there is no real way to have
a) a html form
b) push the form into PDF in a platform independent way.
c) that you can rely of having a totally correct output (you basically
geht what you would get with a print preview)

Theoretically it could be possible to have PDF as rendering frontend
for JSF controls, but nobody has done such a work so far (if pdf can 
handle server connections at all, otherwise forget it)
It would be a huge rewrite on the rendering kit part to have that one 
pdfied if it is possible at all.

Coocoon uses an entirely different approach to achieve the result of
going the html and pdf route:
Cocoon has to my knowledge xml metadata which then is pushed via xsl 
transformations into different rendering targets (sort of what fop does 
also but more dynamical by having a page flow scripting language)

JSF is less data centric and more component centric, such the PDF 
rendering part if you want that automatically has to be done on
component level.
Either way, component level or cocoon in both cases the pdf generation 
is done on the server ony the fly like it would be done with a reporting 
engine.
You cannot rely on the browser of beign able to render PDF and that you 
can control the rendering process from within javascript.



andreas.mitter@magnasteyr.com wrote:
> Hi!
> 
> Regarding to your email it's not possible to transform a JSP directly into a PDF File???
> 
> The reason I ask is the following:
> Just imagine, the user uses a search form where he can constrain the search result with
his search constrains.
> Then he gets some result -->Now I want, that the user is able to print this result...
> 
> Is this not possible?Has nobody ever experienced such problems?
> 
> Regards
> Andy
> 
> -----Urspr√ľngliche Nachricht-----
> Von: news [mailto:news@sea.gmane.org]Im Auftrag von Werner Punz
> Gesendet: Dienstag, 13. Dezember 2005 21:55
> An: users@myfaces.apache.org
> Betreff: Re: AW: Re: What PDF library or framework to create PDF on the
> fly-->iText?
> 
> 
> Well to get it right, the original poster asked for a way to render
> the jsf files into pdf automatically, this is neither possible with 
> xsl-fo nor any other templating mechanism mentioned (cocoon and a bunch 
> of others)
> 
> What probably could be achieved would be some cocoon like intermediate 
> rendering step which renders the page
> 
> a) into a jsf page given a certain base data
> b) into a pdf page
> 
> 
> but this is out of scope for simply applying fop (xsl-fo) you will end 
> up with something cocoonish that way and it is probably out of the time
> scope of the original poster to implement such a thing.
> 
> If you do not want to spend time on a research project into code 
> generation I really can recommend, to split the view into following concerns
> 
> a) a simple HTML Rendering of your forms, which already is done in JSF
> b) a reporting part which extracts nice pdfs closely looking like your 
> forms, this can be done with any reporting tool you like,
> xsl-fo, birt, japser reports or whatever technology to use as reporting 
> frontend.
> 
> 
> 
> 
> Alan Biggs wrote:
> 
>>>FOP is a standard but almost
>>>not used, so design tools are scarce, 
>>
>>
>>Some commercial products use FOP for rendering, such as Altova Stylevision and Stylus
Studio (both of which you can get free trials of).
>>I believe FOP is used quote a lot when it fits the scenario. The FOP site itself does
what the original poster asked - renders a PDF version of each of its HTML pages.
>>
>>
>>
>>>you should probably give visual
>>>tools in conjunction with reporting engines a shot
>>
>>
>>Altova Stylevision is a visual tool/reporting engine based on XML with FOP integration.
>>
>>Not sure about Stylus, but Stylevision I believe allows you to import an HTML file
and then generate the PDF from the result. It will also generate the XSLT for you to plug
into your favourite XML library.
>>
>>FOP is undergoing a long and complete rewrite to support complex features which were
hard to do in the previous version, but the current release is fairly stable and functional
for the more basic layout tasks. If you are using complex layouts, you will probably get frustrated.
(whatever technology you use!)
>>
>>Alan B.
>>
>>----- Original Message -----
>>From: Werner Punz <werpu@gmx.at>
>>Date: Tuesday, December 13, 2005 6:56 am
>>Subject: Re: AW:  Re: What PDF library or framework to create PDF on the fly-->iText?
>>
>>
>>
>>>Fop is just another approach of going from a meta description to a
>>>result with different rendering targets. FOP is a standard but almost
>>>not used, so design tools are scarce, you should probably give visual
>>>tools in conjunction with reporting engines a shot:
>>>Following ones come to my mind
>>>Jasper Reports with one of the Design tools (which there are a 
>>>handful)Eclipse Birt which is free and looks also very good.
>>>
>>>
>>>
>>>
>>>andreas.mitter@magnasteyr.com wrote:
>>>
>>>
>>>>So you think FOP is not the best approach and idea?
>>>>
>>>>
>>>>-----Urspr√ľngliche Nachricht-----
>>>>Von: news [news@sea.gmane.org]Im Auftrag von Werner Punz
>>>>Gesendet: Dienstag, 13. Dezember 2005 14:21
>>>>An: users@myfaces.apache.org
>>>>Betreff: Re: What PDF library or framework to create PDF on the
>>>>fly-->iText?
>>>>
>>>>
>>>>There is no direct way to do that, you only can simulate the 
>>>
>>>form layout
>>>
>>>
>>>>some mentioned cocoon, but that one is only usable that way if 
>>>
>>>you use
>>>
>>>
>>>>cocoon as html frontend as well, but that seems to be out of the
>>>>question, I can recommend to think about simulating your form in PDF
>>>>with the given data,
>>>>BIRT seems to be quite good for this area since it allows various
>>>>datasources and a viusal design.
>>>>Handcoding that stuff via iText is not recommendable, been there 
>>>
>>>done> that too much code.
>>>
>>>
>>>>
>>>>
>>>>andreas.mitter@magnasteyr.com wrote:
>>>>
>>>>
>>>>
>>>>>I already asked some days ago, now I had time to look a bit at 
>>>
>>>iText and
>>>
>>>
>>>>>after that I'm not really smarter than before.
>>>>>
>>>>>I'm not sure if this library will help me.
>>>>>I want to do the following:
>>>>>The Myfaces JSF Page is normally shown to the user (some results 
>>>
>>>from a
>>
>>>>>report or some text from the database)
>>>>>Now I want to have a button, which generates a PDF File out of 
>>>
>>>this screen.
>>>
>>>
>>>>>So the PDF Creating must be done on the fly (depending on what 
>>>
>>>the user
>>>
>>>
>>>>>sees)
>>>>>
>>>>>How can I do that?
>>>>>Any examples?
>>>>>
>>>>>Thx, Regards
>>>>>Andy
>>>>>
>>>>>______________________________________________________________________
>>>>>This email and any files transmitted with it are confidential and
>>>>>intended solely for the use of the individual or entity to whom 
>>>
>>>they are
>>>
>>>
>>>>>addressed. If you have received this email in error please 
>>>
>>>notify your
>>>
>>>
>>>>>system manager. This footnote also confirms that this email 
>>>
>>>message has
>>>
>>>
>>>>>been swept for the presence of computer viruses.
>>>>>______________________________________________________________________
>>>>
>>>>
>>>>
>>>>
>>>______________________________________________________________________> 
>>>
>>>
>>>>This email and any files transmitted with it are confidential and
>>>>intended solely for the use of the individual or entity to whom they
>>>>are addressed. If you have received this email in error please 
>>>
>>>notify> your system manager.
>>>
>>>
>>>>This footnote also confirms that this email message has been swept
>>>>for the presence of computer viruses. 
>>>>
>>>
>>>______________________________________________________________________> 
>>>
>>>
>>
>>
>>
> 
> 
> ______________________________________________________________________
> 
> This email and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom they
> are addressed. If you have received this email in error please notify
> your system manager.
>  
> This footnote also confirms that this email message has been swept
> for the presence of computer viruses. 
> ______________________________________________________________________
> 


Mime
View raw message