You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Peter Romianowski <me...@gmx.de> on 2002/05/30 22:00:47 UTC

Generating PDF - this way?

Hi there,

I just wanted to verify that I am not doing something
really weird. I generate PDFs using Velocity and apache's 
FOP (from xml.apache.org). First I use Velocity to create 
the FO-Input for the FOP.
A template would look like this:

... fop stuff ...

<fo:block font-size="18pt" 
          font-family="sans-serif" 
          line-height="24pt"
          space-after.optimum="15pt"
          background-color="blue"
          color="white"
          text-align="center"
          padding-top="3pt">

    #if ($age >= 18)
        Welcome $salutation $lastname
    #else
        Sorry, lad.
    #end
</fo:block>

... fop ...

This I render to a StringWriter with Velocity and using
the result as Input for the FOP, which then generates
the PDF.

The great benefit for me is that I can use velocity :)
Are there other ways to create PDFs using velocity?
The speed is ok.

cheers,
Peter


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Generating PDF - this way?

Posted by Jason van Zyl <jv...@zenplex.com>.
On Fri, 2002-05-31 at 05:24, Attila Szegedi wrote:
> iText rocks. It's probably uncool to say this on an Apache mailing list, but
> iText leaves FOP in the dust.

Not uncool at all :-) We use iText in Tambora and it's great. I actually
avoid any and all 'standard' XML technologies where possible ;-)

 A critical aspect for me (being a Hungarian)
> is that iText will handle non US-ASCII characters correctly (no surprise,
> its authors are non-English...), while FOP was a major PITA on this
> aspect...
> 
> Cheers,
>   Attila.
> 
> --
> Attila Szegedi
> home: http://www.szegedi.org
> 
> 
> ----- Original Message -----
> From: "Terry Steichen" <te...@net-frame.com>
> To: "Velocity Users List" <ve...@jakarta.apache.org>
> Sent: 2002. május 31. 0:23
> Subject: Re: Generating PDF - this way?
> 
> 
> > Try http://www.lowagie.com/iText/
> >
> > Regards,
> >
> > Terry
> > ----- Original Message -----
> > From: "Saimon Moore" <sa...@yahoo.co.uk>
> > To: "Velocity Users List" <ve...@jakarta.apache.org>
> > Sent: Thursday, May 30, 2002 6:29 PM
> > Subject: Re: Generating PDF - this way?
> >
> >
> > > I generate pdfs with velocity which generates an xml file with tags
> > > specific to the iText (www.itext.org) library and then use that to
> > > generate the pdfs...
> > > try it out...simple and works great ....
> > >
> > > Saimon
> > >
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
-- 
jvz.

Jason van Zyl
jvanzyl@apache.org

http://tambora.zenplex.org


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Generating PDF - this way?

Posted by "Geir Magnusson Jr." <ge...@adeptra.com>.
On 5/31/02 5:24 AM, "Attila Szegedi" <sz...@freemail.hu> wrote:

> iText rocks. It's probably uncool to say this on an Apache mailing list, but
> iText leaves FOP in the dust.

Not uncool at all.  It's good to know about alternatives.  I use as much
apache software as possible, but I will certainly look at it.

And I think it's a great thing that no one needs the work! :)


> A critical aspect for me (being a Hungarian)
> is that iText will handle non US-ASCII characters correctly (no surprise,
> its authors are non-English...), while FOP was a major PITA on this
> aspect...
> 
> Cheers,
> Attila.
> 
> --
> Attila Szegedi
> home: http://www.szegedi.org
> 
> 
> ----- Original Message -----
> From: "Terry Steichen" <te...@net-frame.com>
> To: "Velocity Users List" <ve...@jakarta.apache.org>
> Sent: 2002. május 31. 0:23
> Subject: Re: Generating PDF - this way?
> 
> 
>> Try http://www.lowagie.com/iText/
>> 
>> Regards,
>> 
>> Terry
>> ----- Original Message -----
>> From: "Saimon Moore" <sa...@yahoo.co.uk>
>> To: "Velocity Users List" <ve...@jakarta.apache.org>
>> Sent: Thursday, May 30, 2002 6:29 PM
>> Subject: Re: Generating PDF - this way?
>> 
>> 
>>> I generate pdfs with velocity which generates an xml file with tags
>>> specific to the iText (www.itext.org) library and then use that to
>>> generate the pdfs...
>>> try it out...simple and works great ....
>>> 
>>> Saimon
>>> 
> 
> 
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 

-- 
Geir Magnusson Jr.
Research & Development, Adeptra Inc.
geirm@adeptra.com
+1-203-247-1713



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Generating PDF - this way?

Posted by Attila Szegedi <sz...@freemail.hu>.
iText rocks. It's probably uncool to say this on an Apache mailing list, but
iText leaves FOP in the dust. A critical aspect for me (being a Hungarian)
is that iText will handle non US-ASCII characters correctly (no surprise,
its authors are non-English...), while FOP was a major PITA on this
aspect...

Cheers,
  Attila.

--
Attila Szegedi
home: http://www.szegedi.org


----- Original Message -----
From: "Terry Steichen" <te...@net-frame.com>
To: "Velocity Users List" <ve...@jakarta.apache.org>
Sent: 2002. május 31. 0:23
Subject: Re: Generating PDF - this way?


> Try http://www.lowagie.com/iText/
>
> Regards,
>
> Terry
> ----- Original Message -----
> From: "Saimon Moore" <sa...@yahoo.co.uk>
> To: "Velocity Users List" <ve...@jakarta.apache.org>
> Sent: Thursday, May 30, 2002 6:29 PM
> Subject: Re: Generating PDF - this way?
>
>
> > I generate pdfs with velocity which generates an xml file with tags
> > specific to the iText (www.itext.org) library and then use that to
> > generate the pdfs...
> > try it out...simple and works great ....
> >
> > Saimon
> >


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Generating PDF - this way?

Posted by Terry Steichen <te...@net-frame.com>.
Try http://www.lowagie.com/iText/

Regards,

Terry
----- Original Message -----
From: "Saimon Moore" <sa...@yahoo.co.uk>
To: "Velocity Users List" <ve...@jakarta.apache.org>
Sent: Thursday, May 30, 2002 6:29 PM
Subject: Re: Generating PDF - this way?


> I generate pdfs with velocity which generates an xml file with tags
> specific to the iText (www.itext.org) library and then use that to
> generate the pdfs...
> try it out...simple and works great ....
>
> Saimon
>
> Geir Magnusson Jr. wrote:
>
> >Sounds reasonable.  However, typing all that fo: stuff would get tedious.
> >
> >It would be great to have a PDF/FOP VM lib.  I would really like to have
> >this in DVSL (and willing to pay someone to work on it - if interested,
> >contact me privately...)
> >
> >Geir
> >
> >
> >On 5/30/02 4:00 PM, "Peter Romianowski" <me...@gmx.de> wrote:
> >
> >
> >
> >>Hi there,
> >>
> >>I just wanted to verify that I am not doing something
> >>really weird. I generate PDFs using Velocity and apache's
> >>FOP (from xml.apache.org). First I use Velocity to create
> >>the FO-Input for the FOP.
> >>A template would look like this:
> >>
> >>... fop stuff ...
> >>
> >><fo:block font-size="18pt"
> >>        font-family="sans-serif"
> >>        line-height="24pt"
> >>        space-after.optimum="15pt"
> >>        background-color="blue"
> >>        color="white"
> >>        text-align="center"
> >>        padding-top="3pt">
> >>
> >>  #if ($age >= 18)
> >>      Welcome $salutation $lastname
> >>  #else
> >>      Sorry, lad.
> >>  #end
> >></fo:block>
> >>
> >>... fop ...
> >>
> >>This I render to a StringWriter with Velocity and using
> >>the result as Input for the FOP, which then generates
> >>the PDF.
> >>
> >>The great benefit for me is that I can use velocity :)
> >>Are there other ways to create PDFs using velocity?
> >>The speed is ok.
> >>
> >>
> >
> >
> >
> >
>
>
>
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Generating PDF - this way?

Posted by Saimon Moore <sa...@yahoo.co.uk>.
I generate pdfs with velocity which generates an xml file with tags 
specific to the iText (www.itext.org) library and then use that to 
generate the pdfs...
try it out...simple and works great ....

Saimon

Geir Magnusson Jr. wrote:

>Sounds reasonable.  However, typing all that fo: stuff would get tedious.
>
>It would be great to have a PDF/FOP VM lib.  I would really like to have
>this in DVSL (and willing to pay someone to work on it - if interested,
>contact me privately...)
>
>Geir
>
>
>On 5/30/02 4:00 PM, "Peter Romianowski" <me...@gmx.de> wrote:
>
>  
>
>>Hi there,
>>
>>I just wanted to verify that I am not doing something
>>really weird. I generate PDFs using Velocity and apache's
>>FOP (from xml.apache.org). First I use Velocity to create
>>the FO-Input for the FOP.
>>A template would look like this:
>>
>>... fop stuff ...
>>
>><fo:block font-size="18pt"
>>        font-family="sans-serif"
>>        line-height="24pt"
>>        space-after.optimum="15pt"
>>        background-color="blue"
>>        color="white"
>>        text-align="center"
>>        padding-top="3pt">
>>
>>  #if ($age >= 18)
>>      Welcome $salutation $lastname
>>  #else
>>      Sorry, lad.
>>  #end
>></fo:block>
>>
>>... fop ...
>>
>>This I render to a StringWriter with Velocity and using
>>the result as Input for the FOP, which then generates
>>the PDF.
>>
>>The great benefit for me is that I can use velocity :)
>>Are there other ways to create PDFs using velocity?
>>The speed is ok.
>>    
>>
>
>
>  
>




_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Generating PDF - this way?

Posted by Paulo Gaspar <pa...@krankikom.de>.
Last time I looked I found it to be too easy to pay someone else to do it.

I made a test for my job on using Velocity (not DVSL) to generate PDFs via
FOP and it was quite easy to have it working. You will probably find out how
to do it in the time it would take you to negociate and manage such thing.


Have fun,
Paulo Gaspar

> -----Original Message-----
> From: Geir Magnusson Jr. [mailto:geirm@adeptra.com]
> Sent: Thursday, May 30, 2002 10:06 PM
> To: velocity-user@jakarta.apache.org
> Subject: Re: Generating PDF - this way?
>
>
> Sounds reasonable.  However, typing all that fo: stuff would get tedious.
>
> It would be great to have a PDF/FOP VM lib.  I would really like to have
> this in DVSL (and willing to pay someone to work on it - if interested,
> contact me privately...)
>
> Geir
>
>
> On 5/30/02 4:00 PM, "Peter Romianowski" <me...@gmx.de> wrote:
>
> > Hi there,
> >
> > I just wanted to verify that I am not doing something
> > really weird. I generate PDFs using Velocity and apache's
> > FOP (from xml.apache.org). First I use Velocity to create
> > the FO-Input for the FOP.
> > A template would look like this:
> >
> > ... fop stuff ...
> >
> > <fo:block font-size="18pt"
> >         font-family="sans-serif"
> >         line-height="24pt"
> >         space-after.optimum="15pt"
> >         background-color="blue"
> >         color="white"
> >         text-align="center"
> >         padding-top="3pt">
> >
> >   #if ($age >= 18)
> >       Welcome $salutation $lastname
> >   #else
> >       Sorry, lad.
> >   #end
> > </fo:block>
> >
> > ... fop ...
> >
> > This I render to a StringWriter with Velocity and using
> > the result as Input for the FOP, which then generates
> > the PDF.
> >
> > The great benefit for me is that I can use velocity :)
> > Are there other ways to create PDFs using velocity?
> > The speed is ok.
>
>
> --
> Geir Magnusson Jr.
> Research & Development, Adeptra Inc.
> geirm@adeptra.com
> +1-203-247-1713
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Generating PDF - this way?

Posted by "Geir Magnusson Jr." <ge...@adeptra.com>.
Sounds reasonable.  However, typing all that fo: stuff would get tedious.

It would be great to have a PDF/FOP VM lib.  I would really like to have
this in DVSL (and willing to pay someone to work on it - if interested,
contact me privately...)

Geir


On 5/30/02 4:00 PM, "Peter Romianowski" <me...@gmx.de> wrote:

> Hi there,
> 
> I just wanted to verify that I am not doing something
> really weird. I generate PDFs using Velocity and apache's
> FOP (from xml.apache.org). First I use Velocity to create
> the FO-Input for the FOP.
> A template would look like this:
> 
> ... fop stuff ...
> 
> <fo:block font-size="18pt"
>         font-family="sans-serif"
>         line-height="24pt"
>         space-after.optimum="15pt"
>         background-color="blue"
>         color="white"
>         text-align="center"
>         padding-top="3pt">
> 
>   #if ($age >= 18)
>       Welcome $salutation $lastname
>   #else
>       Sorry, lad.
>   #end
> </fo:block>
> 
> ... fop ...
> 
> This I render to a StringWriter with Velocity and using
> the result as Input for the FOP, which then generates
> the PDF.
> 
> The great benefit for me is that I can use velocity :)
> Are there other ways to create PDFs using velocity?
> The speed is ok.


-- 
Geir Magnusson Jr.
Research & Development, Adeptra Inc.
geirm@adeptra.com
+1-203-247-1713



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>