Uploaded image for project: 'PDFBox'
  1. PDFBox
  2. PDFBOX-4213

UNICODE fonts UTF8

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.0.7
    • None
    • FontBox, PDModel
    • None
    • Hide
      File tamilFontFilePattinatharGist = new File(this.getServletContext().getRealPath("/fonts/GIST-TAM-OTPattinathar_N_Ship.ttf"));
      PDType0Font fontPattinatharGist = PDType0Font.load(document, tamilFontFilePattinatharGist);//Not ok with பேஸ்புக்
      contentStream.setFont( fontPattinatharGist, 15 );

      String testSting="ஆஈ பேஸ்புக் ஆஈஊஐஏளறனடணசஞ‍இஉஎகபமதநயழரலஙவொஓஔ\\r\\nஆஈஊஐஏளறனடணசஞ‍இஉஎகபமதநயழரலஙவொஓஔ";
      contentStream.showText(testSting);
      System.out.println(testSting);
      Show
      File tamilFontFilePattinatharGist = new File(this.getServletContext().getRealPath("/fonts/GIST-TAM-OTPattinathar_N_Ship.ttf")); PDType0Font fontPattinatharGist = PDType0Font.load(document, tamilFontFilePattinatharGist);//Not ok with பேஸ்புக் contentStream.setFont( fontPattinatharGist, 15 ); String testSting="ஆஈ பேஸ்புக் ஆஈஊஐஏளறனடணசஞ‍இஉஎகபமதநயழரலஙவொஓஔ\\r\\nஆஈஊஐஏளறனடணசஞ‍இஉஎகபமதநயழரலஙவொஓஔ"; contentStream.showText(testSting); System.out.println(testSting);

    Description

      When we  use the font with UTF8 code support fonts in the PDFbox with Tamil fonts

      String testSting="  பேஸ்புக் " in the jaav applicationa I got output in PDF with attached image pdf_utf_iss.png format.

      Which is wrong 

      some other fonts works perfect "ஆஈஊஐஏளறனடணச"

      Please help us to resolve the issue 

       

       

      ----------

      File tamilFontFilePattinatharGist = new File(this.getServletContext().getRealPath("/fonts/GIST-TAM-OTPattinathar_N_Ship.ttf"));
      PDType0Font fontPattinatharGist = PDType0Font.load(document, tamilFontFilePattinatharGist);//Not ok with பேஸ்புக்

      contentStream.setFont( fontPattinatharGist, 15 );

      String testSting="ஆஈ பேஸ்புக் ஆஈஊஐஏளறனடணசஞ‍இஉஎகபமதநயழரலஙவொஓஔ\\r
      nஆஈஊஐஏளறனடணசஞ‍இஉஎகபமதநயழரலஙவொஓஔ";
      contentStream.showText(testSting);
      System.out.println(testSting);

       

      Attachments

        1. pdf_utf_iss.png
          1 kB
          tritmain

        Activity

          People

            Unassigned Unassigned
            tritmain tritmain
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: