4 Replies Latest reply on Jan 7, 2010 2:01 AM by Gary Marshall

    p:newPage doesn't appear to work

    Robert Morse Apprentice

      The p:newPage tag doesn't appear to generate a new pdf page as advertised.

        • 1. Re: p:newPage doesn't appear to work
          System Administrator Expert
          <p:newPage> Description
          p:newPage inserts a page break.
          Usage
          <p:newPage />

          • 2. Re: p:newPage doesn't appear to work
            Robert Morse Apprentice

            Yeah, I actually did RTFM.  It still doesn't work.


            • 3. Re: p:newPage doesn't appear to work
              System Administrator Expert

              you need to be more specific about the error or behavior you're seeing.


              Have you built and deployed the iText example in the Seam distro?


              here's a facelet example that uses <p:newPage/> in pages.xhtml:


              <p:document>
              
              <ui:repeat value="#{lists.numbers}" var="number">
              <p:newPage/>
              <p:image alignment="right" value="/jboss.jpg"/>
              
              <p:font family="Helvetica" size="36">
              <p:paragraph alignment="center">Page #{number}</p:paragraph>
              </p:font>
              
              <p:font family="Helvetica">
              
              <p:paragraph alignment="justify">
              JBoss Seam is a powerful new application framework for building next generation Web 2.0 applications by unifying and integrating technologies such as Asynchronous JavaScript and XML (AJAX), Java Server Faces (JSF), Enterprise Java Beans (EJB3), Java Portlets and Business Process Management (BPM).
              </p:paragraph>
              
              <p:paragraph alignment="justify">
              Seam has been designed from the ground up to eliminate complexity at the architecture and the API level. It enables developers to assemble complex web applications with simple annotated Plain Old Java Objects (POJOs), componentized UI widgets and very little XML. The simplicity of Seam 1.0 will enable easy integration with the JBoss Enterprise Service Bus (ESB) and Java Business Integration (JBI) in the future.
              </p:paragraph>
              </p:font>
              </ui:repeat>
              </p:document>


              • 4. Re: p:newPage doesn't appear to work
                Gary Marshall Newbie
                Hey Robert,  I RTFM too, and it isn't working for me either.

                Actually, the first <newPage/> tag works, but subsequent ones don't.

                Did you find a solution?