You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by David Delbecq <de...@oma.be> on 2007/08/06 11:32:27 UTC

make pdf using JSF

Hello,

i come across a requirement where i need to generate a PDF, by adding
text at specific location inside an existing pdf. I thought about using
a servlet that does it using itext. However, after turning on my brain,
i think it would be very interresting if you could instead do something
like this in a JSF/Facelet application:
<x:pdf value="#{someBinaryDocument}">
    <x:page number="1">
       <x:outputText value="#{someBean.property}">
          <some classical JSF converter>
       </x:outputText>
    </x:page>
</x:pdf>

I know how to create binary output from a JSF component (get
outpustream, set headers, set responseComplete())

Oracle ADF has a telnet renderer, i suppose there could exist some PDF
based renderers out there. Interest would be to generate PDF output as
easily as html output. It does not seems so difficult to implement a few
PDF based JSF components using itext. However, i'd like to prevent
stupid double work if this stuff already exist somewhere.

Anyone know of existing library for this?

-- 
http://www.noooxml.org/


Re: make pdf using JSF

Posted by Jurgen Lust <Ju...@gmail.com>.
Starting from version 1.1, it should run in a Tomcat instance. 

Jurgen

Op maandag 06-08-2007 om 12:17 uur [tijdzone +0100], schreef Mikael
Andersson:
> Yes
> 
> On 06/08/07, David Delbecq <de...@oma.be> wrote:
>         Can seam work with anything other than JBoss (like tomcat?)
>         En l'instant précis du 06/08/07 11:37, Jurgen Lust s'exprimait
>         en ces
>         termes:
>         > You can do this with JBoss Seam:
>         >
>         http://docs.jboss.com/seam/1.2.1.GA/reference/en/html/itext.html
>         >
>         > Jurgen
>         >
>         > Op maandag 06-08-2007 om 11:32 uur [tijdzone +0200], schreef
>         David
>         > Delbecq:
>         >
>         >> Hello,
>         >>
>         >> i come across a requirement where i need to generate a PDF,
>         by adding
>         >> text at specific location inside an existing pdf. I thought
>         about using
>         >> a servlet that does it using itext. However, after turning
>         on my brain, 
>         >> i think it would be very interresting if you could instead
>         do something
>         >> like this in a JSF/Facelet application:
>         >> <x:pdf value="#{someBinaryDocument}">
>         >>     <x:page number="1"> 
>         >>        <x:outputText value="#{someBean.property}">
>         >>           <some classical JSF converter>
>         >>        </x:outputText>
>         >>     </x:page>
>         >> </x:pdf> 
>         >>
>         >> I know how to create binary output from a JSF component
>         (get
>         >> outpustream, set headers, set responseComplete())
>         >>
>         >> Oracle ADF has a telnet renderer, i suppose there could
>         exist some PDF 
>         >> based renderers out there. Interest would be to generate
>         PDF output as
>         >> easily as html output. It does not seems so difficult to
>         implement a few
>         >> PDF based JSF components using itext. However, i'd like to
>         prevent 
>         >> stupid double work if this stuff already exist somewhere.
>         >>
>         >> Anyone know of existing library for this?
>         >>
>         >>
>         
>         
>         --
>         http://www.noooxml.org/
>         
> 
-- 
____________________________________________________
Jurgen Lust
email: jlust@apache.org
blog: http://jroller.com/page/jurgenlust
____________________________________________________

Re: make pdf using JSF

Posted by Mikael Andersson <ma...@gmail.com>.
Yes

On 06/08/07, David Delbecq <de...@oma.be> wrote:
>
> Can seam work with anything other than JBoss (like tomcat?)
> En l'instant précis du 06/08/07 11:37, Jurgen Lust s'exprimait en ces
> termes:
> > You can do this with JBoss Seam:
> > http://docs.jboss.com/seam/1.2.1.GA/reference/en/html/itext.html
> >
> > Jurgen
> >
> > Op maandag 06-08-2007 om 11:32 uur [tijdzone +0200], schreef David
> > Delbecq:
> >
> >> Hello,
> >>
> >> i come across a requirement where i need to generate a PDF, by adding
> >> text at specific location inside an existing pdf. I thought about using
> >> a servlet that does it using itext. However, after turning on my brain,
> >> i think it would be very interresting if you could instead do something
> >> like this in a JSF/Facelet application:
> >> <x:pdf value="#{someBinaryDocument}">
> >>     <x:page number="1">
> >>        <x:outputText value="#{someBean.property}">
> >>           <some classical JSF converter>
> >>        </x:outputText>
> >>     </x:page>
> >> </x:pdf>
> >>
> >> I know how to create binary output from a JSF component (get
> >> outpustream, set headers, set responseComplete())
> >>
> >> Oracle ADF has a telnet renderer, i suppose there could exist some PDF
> >> based renderers out there. Interest would be to generate PDF output as
> >> easily as html output. It does not seems so difficult to implement a
> few
> >> PDF based JSF components using itext. However, i'd like to prevent
> >> stupid double work if this stuff already exist somewhere.
> >>
> >> Anyone know of existing library for this?
> >>
> >>
>
>
> --
> http://www.noooxml.org/
>
>

Re: make pdf using JSF

Posted by David Delbecq <de...@oma.be>.
Can seam work with anything other than JBoss (like tomcat?)
En l'instant précis du 06/08/07 11:37, Jurgen Lust s'exprimait en ces
termes:
> You can do this with JBoss Seam: 
> http://docs.jboss.com/seam/1.2.1.GA/reference/en/html/itext.html
>
> Jurgen
>
> Op maandag 06-08-2007 om 11:32 uur [tijdzone +0200], schreef David
> Delbecq:
>   
>> Hello,
>>
>> i come across a requirement where i need to generate a PDF, by adding
>> text at specific location inside an existing pdf. I thought about using
>> a servlet that does it using itext. However, after turning on my brain,
>> i think it would be very interresting if you could instead do something
>> like this in a JSF/Facelet application:
>> <x:pdf value="#{someBinaryDocument}">
>>     <x:page number="1">
>>        <x:outputText value="#{someBean.property}">
>>           <some classical JSF converter>
>>        </x:outputText>
>>     </x:page>
>> </x:pdf>
>>
>> I know how to create binary output from a JSF component (get
>> outpustream, set headers, set responseComplete())
>>
>> Oracle ADF has a telnet renderer, i suppose there could exist some PDF
>> based renderers out there. Interest would be to generate PDF output as
>> easily as html output. It does not seems so difficult to implement a few
>> PDF based JSF components using itext. However, i'd like to prevent
>> stupid double work if this stuff already exist somewhere.
>>
>> Anyone know of existing library for this?
>>
>>     


-- 
http://www.noooxml.org/


Re: make pdf using JSF

Posted by Jurgen Lust <Ju...@gmail.com>.
You can do this with JBoss Seam: 
http://docs.jboss.com/seam/1.2.1.GA/reference/en/html/itext.html

Jurgen

Op maandag 06-08-2007 om 11:32 uur [tijdzone +0200], schreef David
Delbecq:
> Hello,
> 
> i come across a requirement where i need to generate a PDF, by adding
> text at specific location inside an existing pdf. I thought about using
> a servlet that does it using itext. However, after turning on my brain,
> i think it would be very interresting if you could instead do something
> like this in a JSF/Facelet application:
> <x:pdf value="#{someBinaryDocument}">
>     <x:page number="1">
>        <x:outputText value="#{someBean.property}">
>           <some classical JSF converter>
>        </x:outputText>
>     </x:page>
> </x:pdf>
> 
> I know how to create binary output from a JSF component (get
> outpustream, set headers, set responseComplete())
> 
> Oracle ADF has a telnet renderer, i suppose there could exist some PDF
> based renderers out there. Interest would be to generate PDF output as
> easily as html output. It does not seems so difficult to implement a few
> PDF based JSF components using itext. However, i'd like to prevent
> stupid double work if this stuff already exist somewhere.
> 
> Anyone know of existing library for this?
> 
-- 
____________________________________________________
Jurgen Lust
email: jlust@apache.org
blog: http://jroller.com/page/jurgenlust
____________________________________________________

Re: make pdf using JSF

Posted by david delbecq <de...@oma.be>.
david delbecq a écrit :
> After quick check, seems seam is a bit of big framework to add for 
> just pdf, does not support jdk 1.4 (>=5.0 only), and anyway there 
> doesn't seem to be seam component that add text at specific location 
> of an existing document, which is my aim. (It will be generated by a 
> fill the form, get a prefilled PDF form to print web page).
>
Lol, we are currently coding that exact set of component at work, cause 
we found no existing framework to do it. We too found seam and we too 
dropped it because it was new document only and too heavy. If you find 
an existing framework using the itext stampers (overlay information on 
top of existing pdf page) for computer aided text form filling, we'll be 
happy to use it and save on development time.


> Any other suggestion?
>
> Thank you.
>
> En l'instant précis du 06/08/07 11:37, Mikael Andersson s'exprimait en 
> ces termes:
>> Haven't tried this myself yet, but Seam can generate PDFs.
>>
>> http://docs.jboss.com/seam/2.0.0.B1/reference/en/html/itext.html
>>
>> - Mike
>>
>> On 06/08/07, *David Delbecq* <delbd+jakarta@oma.be 
>> <ma...@oma.be>> wrote:
>>
>>     Hello,
>>
>>     i come across a requirement where i need to generate a PDF, by 
>> adding
>>     text at specific location inside an existing pdf. I thought about
>>     using
>>     a servlet that does it using itext. However, after turning on my
>>     brain,
>>     i think it would be very interresting if you could instead do
>>     something
>>     like this in a JSF/Facelet application:
>>     <x:pdf value="#{someBinaryDocument}">
>>         <x:page number="1">
>>            <x:outputText value="#{someBean.property}">
>>               <some classical JSF converter>
>>            </x:outputText>
>>         </x:page>
>>     </x:pdf>
>>
>>     I know how to create binary output from a JSF component (get
>>     outpustream, set headers, set responseComplete())
>>
>>     Oracle ADF has a telnet renderer, i suppose there could exist 
>> some PDF
>>     based renderers out there. Interest would be to generate PDF 
>> output as
>>     easily as html output. It does not seems so difficult to implement
>>     a few
>>     PDF based JSF components using itext. However, i'd like to prevent
>>     stupid double work if this stuff already exist somewhere.
>>
>>     Anyone know of existing library for this?
>>
>>     --
>>     http://www.noooxml.org/
>>
>>
>
>


Re: make pdf using JSF

Posted by david delbecq <de...@oma.be>.
After quick check, seems seam is a bit of big framework to add for just 
pdf, does not support jdk 1.4 (>=5.0 only), and anyway there doesn't 
seem to be seam component that add text at specific location of an 
existing document, which is my aim. (It will be generated by a fill the 
form, get a prefilled PDF form to print web page).

Any other suggestion?

Thank you.

En l'instant précis du 06/08/07 11:37, Mikael Andersson s'exprimait en 
ces termes:
> Haven't tried this myself yet, but Seam can generate PDFs.
>
> http://docs.jboss.com/seam/2.0.0.B1/reference/en/html/itext.html
>
> - Mike
>
> On 06/08/07, *David Delbecq* <delbd+jakarta@oma.be 
> <ma...@oma.be>> wrote:
>
>     Hello,
>
>     i come across a requirement where i need to generate a PDF, by adding
>     text at specific location inside an existing pdf. I thought about
>     using
>     a servlet that does it using itext. However, after turning on my
>     brain,
>     i think it would be very interresting if you could instead do
>     something
>     like this in a JSF/Facelet application:
>     <x:pdf value="#{someBinaryDocument}">
>         <x:page number="1">
>            <x:outputText value="#{someBean.property}">
>               <some classical JSF converter>
>            </x:outputText>
>         </x:page>
>     </x:pdf>
>
>     I know how to create binary output from a JSF component (get
>     outpustream, set headers, set responseComplete())
>
>     Oracle ADF has a telnet renderer, i suppose there could exist some PDF
>     based renderers out there. Interest would be to generate PDF output as
>     easily as html output. It does not seems so difficult to implement
>     a few
>     PDF based JSF components using itext. However, i'd like to prevent
>     stupid double work if this stuff already exist somewhere.
>
>     Anyone know of existing library for this?
>
>     --
>     http://www.noooxml.org/
>
>


-- 
David Delbecq
Institut Royal Météorologique
Ext:518


Re: make pdf using JSF

Posted by Mikael Andersson <ma...@gmail.com>.
Haven't tried this myself yet, but Seam can generate PDFs.

http://docs.jboss.com/seam/2.0.0.B1/reference/en/html/itext.html

- Mike

On 06/08/07, David Delbecq <de...@oma.be> wrote:
>
> Hello,
>
> i come across a requirement where i need to generate a PDF, by adding
> text at specific location inside an existing pdf. I thought about using
> a servlet that does it using itext. However, after turning on my brain,
> i think it would be very interresting if you could instead do something
> like this in a JSF/Facelet application:
> <x:pdf value="#{someBinaryDocument}">
>     <x:page number="1">
>        <x:outputText value="#{someBean.property}">
>           <some classical JSF converter>
>        </x:outputText>
>     </x:page>
> </x:pdf>
>
> I know how to create binary output from a JSF component (get
> outpustream, set headers, set responseComplete())
>
> Oracle ADF has a telnet renderer, i suppose there could exist some PDF
> based renderers out there. Interest would be to generate PDF output as
> easily as html output. It does not seems so difficult to implement a few
> PDF based JSF components using itext. However, i'd like to prevent
> stupid double work if this stuff already exist somewhere.
>
> Anyone know of existing library for this?
>
> --
> http://www.noooxml.org/
>
>