4 Replies Latest reply on Jan 19, 2011 4:58 AM by omid pourhadi

    seam pdf encoding

    omid pourhadi Apprentice

      Hi,
      i am using seam pdf but unfortunatly when i generate pdf file, unicode character does not shown how can i overcome this situation ?

        • 1. Re: seam pdf encoding
          Leo van den berg Master

          Hi,


          This has to do with the fact that the PDF-generator should include the special fonts in the final result.
          As far as I know the seam PDF generator isn't able to do this, so you should go back to the basics.
          To prevent these problems I use JasperReport. Its editor iReport has the posibility to define the inclusion of fonts, which works.


          It's a bit more complicated, but the ireport designer is a great tool, compared to the spartan way of editing Seam PDF pages.


          Just give it a try


          Leo 

          • 2. Re: seam pdf encoding
            Tony Herstell Master

            Also moved to Jasper Reports to overcome limitations.
            Watch for fonts being on server as well.

            • 3. Re: seam pdf encoding
              Rossen Gospodinov Newbie

              This problem was solved a few months ago. I personally wrote the fix that was included in version 2.2.1.CR1:


              https://issues.jboss.org/browse/JBSEAM-2369


              The font must be installed on the system or embedded in the PDF document.


              If you are using a facelets template for generating the PDF use:


              <p:font name="/usr/share/fonts/webcore/verdana.ttf" encoding="Cp1251" embedded="true" size="10" style="bold">


              or


              <p:font name="c:\\windows\\fonts\\verdana.ttf" encoding="Cp1251" embedded="true" size="10" style="bold">

              • 4. Re: seam pdf encoding
                omid pourhadi Apprentice
                Hi,
                i created seam pdf but i've got wierd result
                text must appear sth like this
                اميد پورهادي
                but it appears this
                ا م ي د پ و ر ه ا د ي
                words seperate from each other
                [CODE]<p:font name="c:\\windows\\fonts\\arial.ttf" encoding="Identity-H"  embedded="true" >
                اميد پورهادي
                </p:font>
                [/CODE]
                I'm using JBOSS AS 6 and SEAM 2.2.1CR3