Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 2.0.3
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      Android studio

      Description

      Hello
      I port PDFBox 2.0.3 to Android.It works well.But my problem is seperate arabic character in created pdf document.how do i fix it?

      My Code :

      try {
                          PDDocument document = new PDDocument();
                          
                          PDFont font =  PDType0Font.load(document, getAssets().open("fonts/tahoma.ttf") );
      
                          for (int i = 0; i < images.size(); i++) {
                              if (!images.get(i).equals("")) {
                                  PDPage page = new PDPage(PDRectangle.A4);
                                  Log.e("debug","code pos 1");
                                  // page.set
                                  document.addPage(page);
      
                                  PDPageContentStream contentStream = new PDPageContentStream(document, page);
      
                                  contentStream.beginText();
                                  contentStream.setFont(font, 12);
                                  contentStream.setLeading(12 * 1.2);
      
                                  contentStream.newLineAtOffset(50, 600);
                                  contentStream.showText("اسلام علیکم 1"); // printed : ا س ل ا م ع ل ی ک م 1
                                  contentStream.newLine();
      							
                                  contentStream.endText();
      
                                  contentStream.close();
      							....
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                javadvjj javad
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: