In this code, Its possible to add the txt file. But I want to add a word file
in the place of the txt. Is it possible to do so?

Document document = new Document(PageSize.A4);
                try {
                        // step 2:
                        // we create a writer
                        PdfWriter writer = PdfWriter.getInstance(
                        // that listens to the document
                                        document,
                                        // and directs a PDF-stream to a file
                                        new
FileOutputStream("results/in_action/chapter07/column_set_text.pdf"));
                        // step 3: we open the document
                        document.open();
                        // step 4: we add a table to the document
                        StringBuffer sb = new StringBuffer(1024);
                        BufferedReader reader = new BufferedReader(new 
FileReader(
                                        
"resources/in_action/chapter07/caesar.txt"));
                        int c;
                        while ((c = reader.read()) > -1) {
                                sb.append((char) c);
                        }

-- 
View this message in context: 
http://old.nabble.com/word-file-in-the-place-of-the-txt-tp26635763p26635763.html
Sent from the iText - General mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
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