You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by arterzatij <ar...@gmail.com> on 2012/11/30 20:53:00 UTC

Images from DB to PDF File

Hi folks,

    There is a way to build a pdf files from images stores on DB? 

I like to do something like follows:

The user has a link that contains context params, when the user clicks on it
the PDF gonna be generated (as stream response) and then downloaded to
client side ...

Any point is welcome thanks!



--
View this message in context: http://tapestry.1045711.n5.nabble.com/Images-from-DB-to-PDF-File-tp5718438.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Images from DB to PDF File

Posted by Thiago H de Paula Figueiredo <th...@gmail.com>.
On Fri, 30 Nov 2012 18:06:59 -0200, Bob Obringer <bo...@adaptrex.com> wrote:

> Take a look at iText
>
> http://itextpdf.com/
>
> It will provide you with many different approaches to actually get your  
> images out of the database and insert them into a PDF.  I've been  
> loading images and inserting them into iText for several years with  
> great success.

Exactly. After that, you'll return a StreamResponse wrapping your PDF in a  
page onActivate() method or in any event handler method to return the PDF  
bytes to the browser.

-- 
Thiago H. de Paula Figueiredo

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Images from DB to PDF File

Posted by Bob Obringer <bo...@adaptrex.com>.
Take a look at iText 

http://itextpdf.com/

It will provide you with many different approaches to actually get your images out of the database and insert them into a PDF.  I've been loading images and inserting them into iText for several years with great success.



-- 
Bob Obringer
Sent with Sparrow (http://www.sparrowmailapp.com/?sig)


On Friday, November 30, 2012 at 2:53 PM, arterzatij wrote:

> Hi folks,
> 
> There is a way to build a pdf files from images stores on DB? 
> 
> I like to do something like follows:
> 
> The user has a link that contains context params, when the user clicks on it
> the PDF gonna be generated (as stream response) and then downloaded to
> client side ...
> 
> Any point is welcome thanks!
> 
> 
> 
> --
> View this message in context: http://tapestry.1045711.n5.nabble.com/Images-from-DB-to-PDF-File-tp5718438.html
> Sent from the Tapestry - User mailing list archive at Nabble.com (http://Nabble.com).
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org (mailto:users-unsubscribe@tapestry.apache.org)
> For additional commands, e-mail: users-help@tapestry.apache.org (mailto:users-help@tapestry.apache.org)
> 
> 



Re: Images from DB to PDF File

Posted by Lance Java <la...@googlemail.com>.
Note that itext is only free for open source 



--
View this message in context: http://tapestry.1045711.n5.nabble.com/Images-from-DB-to-PDF-File-tp5718438p5718446.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Images from DB to PDF File

Posted by arterzatij <ar...@gmail.com>.
I'll check it Lance, but in the while the Itext solution fits on my
requirement they are just pictures, thanks folks it's up and running :)



--
View this message in context: http://tapestry.1045711.n5.nabble.com/Images-from-DB-to-PDF-File-tp5718438p5718445.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Images from DB to PDF File

Posted by Lance Java <la...@googlemail.com>.
I've written a component which allows the power of tapestry components to
extend to PDFs by integrating with apache FOP.

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

PDF Demo: 
https://github.com/uklance/tapestry-stitch-demo/blob/master/src/main/java/org/lazan/t5/stitch/demo/pages/PDFDemo.java
https://github.com/uklance/tapestry-stitch-demo/blob/master/src/main/resources/org/lazan/t5/stitch/demo/pages/PDFDemo.tml

PDFLink Component: 
https://github.com/uklance/tapestry-stitch/blob/master/src/main/java/org/lazan/t5/stitch/components/PDFLink.java
https://github.com/uklance/tapestry-stitch/blob/master/src/main/resources/org/lazan/t5/stitch/components/PDFLink.tml



--
View this message in context: http://tapestry.1045711.n5.nabble.com/Images-from-DB-to-PDF-File-tp5718438p5718444.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org