1 Reply Latest reply on May 31, 2009 3:58 PM by mdesignz

    Odd PDF Format Problem

    mdesignz

      This is strange.  I'm trying to create a two column PDF using Seam 2.1.2.CR2 under JBoss 4.2.3.GA, Mac OS X 10.5.7.  What follows is the xhtml file used to create the PDF.  If you render this with Seam, you'll notice that the first paragraph is repeated.  If you remove the 3rd paragraph, then the repetition does not occur!  (Disclaimer:  The source of the text comes from a news story about GM posted on the CNN web site.  I couldn't post the actual content of my PDF for confidentiality reasons).  I've tried adding fixedHeight, keepTogether, etc., with no effect.




      <p:document xmlns:ui="http://java.sun.com/jsf/facelets"
           xmlns:f="http://java.sun.com/jsf/core"
           xmlns:p="http://jboss.com/products/seam/pdf" type="PDF"
           pageSize="LETTER" orientation="portrait" margins="32 32 32 18"
           subject="Test" title="Test"
           author="Robert D. Morse" creator="Robert D. Morse"
           keywords="Test">
      
      
           <p:font family="helvetica" size="12" style="bold">
                <p:paragraph spacingBefore="0">This is a test</p:paragraph>
           </p:font>
      
           <p:table spacingBefore="18" widthPercentage="100" columns="2">
                <p:cell borderWidthBottom="1" borderWidthTop="1" borderWidthLeft="1"
                     borderWidthRight="1">
                     <p:font family="helvetica" size="10" style="normal">
                          <p:paragraph keepTogether="true">
                               <p:text value ="DETROIT - General Motors Corp. has pulled together many of the pieces needed to complete a government-ordered restructuring, but its board still is likely to decide Saturday to head into bankruptcy protection because there is too much left to do."/>
                          </p:paragraph>
                     </p:font>
                     <p:font family="helvetica" size="10" style="normal">
                          <p:paragraph spacingBefore="9" keepTogether="true"><p:text value = "Word of the board's decision, which would be made during two days of meetings, may not be known until Monday, when GM is expected to actually file for bankruptcy protection in a New York federal court." /></p:paragraph>
                     </p:font>
                     <!--  Remove the next section and it will format normally -->               
                     <p:font family="helvetica" size="10" style="normal">
                          <p:paragraph spacingBefore="9"><p:text value ="This causes a repeat of the first paragraph" /></p:paragraph>
                     </p:font>                    
                                    
                </p:cell>
      
                <p:cell borderWidthBottom="1" borderWidthTop="1" borderWidthLeft="0"
                     borderWidthRight="1">
                     <p:font family="helvetica" size="10" style="normal">
                          <p:paragraph>
                               <p:text value ="The troubled automaker made much progress last week, signing a cost-cutting deal with its main union, the United Auto Workers, and announcing it would reopen a closed plant to build the next generation of small fuel-efficient cars in the U.S., rather than in China."/>
                          </p:paragraph>
                     </p:font>
                     <p:font family="helvetica" size="10" style="normal">
                          <p:paragraph spacingBefore="9">
                               <p:text value = "But its offer to bondholders to swap $27 billion in unsecured debt for 10 percent of the company's shares fell apart, and the government stepped in with a new offer that includes a Chapter 11 bankruptcy protection filing, 10 percent of the shares and the chance to buy 15 percent more." />
                          </p:paragraph>
                     </p:font>     
                     <!--  Remove the next section and it will format normally -->               
                     <p:font family="helvetica" size="10" style="normal">
                          <p:paragraph spacingBefore="9"><p:text value ="This causes a repeat of the first paragraph." /></p:paragraph>
                     </p:font>                    
                </p:cell>
           </p:table>
      </p:document>