I think you have to do something like document.isPageBlank(true); in order
for that to work.  Otherwise, itext ignores the command.  

 

 

 

  _____  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Alleni
Sent: Thursday, October 25, 2007 5:22 PM
To: Post all your questions about iText here
Subject: Re: [iText-questions] newPage() Functionality

 

Sean,

See section "How to create a new page in iText" from the following url
http://itextdocs.lowagie.com/tutorial/general/faq/index.php 

If you invoke newPage and the current page is blank, no new page will be
added.

On 10/25/07, Sean Conlon <[EMAIL PROTECTED]> wrote: 

I am sure there is a good explanation for this, but it appears as though the
new blank pages that I add to the document with "document.newPage()" are not
added to the HelloWorld.pdf (see code snippet below).  

 

This is purely a test in order to understand when a page is actually created
in the final PDF file that I am creating.  I assumed that when you use
"document.open()" that a new page is automatically given to the document,
but it does not appear that a new page is added to the document in this
method or even within the document's constructor.  

 

Any help would be appreciated.  

 

Thanks, 

    Sean  

 

 

Document document = new Document();

 

        try {

            PdfWriter.getInstance( document, new
FileOutputStream("HelloWorld.pdf" ));

 

            document.open(); 

 

            document.add( new Paragraph( "Hello World")); 

            document.newPage(); 

            document.newPage(); 

            document.newPage();

            .

      }

 

      .

 

 

 

 


-------------------------------------------------------------------------
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/
<http://itext.ugent.be/itext-in-action/> 

 

-------------------------------------------------------------------------
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