Hi bruno i am sachin. I have generated pdf using itext but the problem is i 
can't save that pdf in my system. How i can save that pdf ?On Fri, 19 Jun 2009 
15:57:31 +0200 Post all your questions about iText here  wrote  dmholte wrote:  
> Hi Bruno, the variable String HospNote contains the original html.     The 
answer is very simple (explained in chapter 6 of the book),  but I have some 
additional remarks:    >           writer.setPageEvent(new ParseBuildPdf()); 
   Using an event to add header/footers is good.    >           HeaderFooter 
header = new HeaderFooter(headerPhrase,false);    Using the HeaderFooter class 
is no longer supported!    >           ArrayList p = 
HTMLWorker.parseToList(new  > StringReader(HospNote),null);  >            
             for (int k=0;k                         
document.add((Element)p.get(k));    //step 4 adding  > content- the note    
Replace the above with:    Element e;  for (int k=0;k           
baos.writeTo(fo);  You didn't write anything to baos AND fo should already be 
closed by   document.close();  Moreover: YOU SHOULD NEVER ADD EXTRA BYTES to a 
PDF document!!!  All this should be unnecessary:  >           try 
{fo.flush();}catch(Exception e){;}  >           try 
{fo.close();}catch(Exception e){;}  >           try 
{baos.close();}catch(Exception e){;}  >           fo = null;  >           
baos = null;   br,  Bruno    
------------------------------------------------------------------------------  
Crystal Reports - New Free Runtime and 30 Day Trial  Check out the new 
simplified licensing option that enables unlimited  royalty-free distribution 
of the report engine for externally facing   server and web deployment.  
http://p.sf.net/sfu/businessobjects  
_______________________________________________  iText-questions mailing list  
[email protected]  
https://lists.sourceforge.net/lists/listinfo/itext-questions    Buy the iText 
book: http://www.1t3xt.com/docs/book.php  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/  
------------------------------------------------------------------------------
Are you an open source citizen? Join us for the Open Source Bridge conference!
Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250.
Need another reason to go? 24-hour hacker lounge. Register today!
http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
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/

Reply via email to