thx for the reply, i already found way
On 29 June 2010 08:05, 1T3XT info [via iText - General] <
[email protected]<ml-node%[email protected]>
> wrote:
> kaable wrote:
> > hi to all
> >
> > i new in itext, so how i can add more than one chart (from JFreeChart)
> with
> > iText,
>
> See chapter 14 of the second edition of "iText in Action".
> This is the result of listing 14.13 and 14.14:
> http://www.flickr.com/photos/itextinaction/4484123858/
>
> > i have this code and for everytime i have one more chart i call this
> > function
>
> Where did you find that code?
>
> > public void chartToPdf(JFreeChart chart){
> > try{
> > document.open();
> > PdfContentByte cb = writer.getDirectContent();
> > PdfTemplate tp = cb.createTemplate(width, height);
> > Graphics2D g2d = tp.createGraphics(width, height, new
> > DefaultFontMapper());
> >
> > Rectangle2D r2d = new Rectangle2D.Double(x,y,width,height);
> > chart.draw(g2d, r2d);
> > g2d.dispose();
> > cb.addTemplate(tp, x, y);
> >
> > document.newPage();
> > writer.setPageEmpty(false);
> > document.close();
> >
> > }catch(Exception e){ e.printStackTrace();}
> > }
> >
> > but in the end it doesnt write in the file?
>
> The code isn't complete enough to create a PDF file;
> but it has too many lines if you want to use it as a method
> to add a chart to a PDF in a larger program.
>
> As you are new to iText, you will certainly benefit from
> http://itextpdf.com/book/
> --
> This answer is provided by 1T3XT BVBA
> http://www.1t3xt.com/ - http://www.1t3xt.info<http://www.1t3xt.info?by-user=t>
>
> ------------------------------------------------------------------------------
>
> This SF.net email is sponsored by Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
> _______________________________________________
> iText-questions mailing list
> [hidden email] <http://user/SendEmail.jtp?type=node&node=2271822&i=0>
> https://lists.sourceforge.net/lists/listinfo/itext-questions
>
> Buy the iText book: http://www.itextpdf.com/book/
> Check the site with examples before you ask questions:
> http://www.1t3xt.info/examples/
> You can also search the keywords list:
> http://1t3xt.info/tutorials/keywords/
>
>
> ------------------------------
> View message @
> http://itext-general.2136553.n4.nabble.com/Adding-more-than-one-JfreeChart-with-itext-tp2271191p2271822.html
> To unsubscribe from Adding more than one JfreeChart with itext, click
> here<http://itext-general.2136553.n4.nabble.com/subscriptions/Unsubscribe.jtp?code=Z29uY2Fsby5zaWx2YS5tYXJxdWVzQGdtYWlsLmNvbXwyMjcxMTkxfDIyNDU5MjM2Mw==>.
>
>
>
--
Cumprimentos
Gonçalo Marques
--
View this message in context:
http://itext-general.2136553.n4.nabble.com/Adding-more-than-one-JfreeChart-with-itext-tp2271191p2271921.html
Sent from the iText - General mailing list archive at Nabble.com.
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://www.itextpdf.com/book/
Check the site with examples before you ask questions:
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/