here is my code that is not working.  The first for loop is for setting the
text and the actions.  The second for loop is for creating blank pages.
Thanks.


Document document = new Document();
                try {
                        PdfWriter writer = PdfWriter.getInstance(document,
                                        new FileOutputStream("toc.pdf"));
                        document.open();
                        PdfDestination dest = new 
PdfDestination(PdfDestination.FIT);
                        Chunk chunk;
                        Paragraph p;
                        int pagenumbers = 8;
                        for (int i=0;i<pagenumbers;) {
                                ++i;
                                chunk = new Chunk("Page "+i);
                                chunk.setAction(PdfAction.gotoLocalPage(i, 
dest, writer));
                                p = new Paragraph(chunk);
                                document.add(p);
                        }
                        for (int i=0;i<pagenumbers;) {
                                ++i;
                                document.newPage();
                                writer.setPageEmpty(false);
                        }
                        document.close();
-- 
View this message in context: 
http://www.nabble.com/problem-combining-dynamic-content-with-existing-pdf-tf4207181.html#a11985541
Sent from the iText - General mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to