1

I am trying to write a code using that PDF can be generated for different languages. Its working for most of the language like (english ,japanese ,korean ,chinese) but for arabic language text is appearing as "?" .This is git HTML TO PDF converted code link of code. Could you please suggest what i am missing and how it can be corrected . I am using PD4ML library for HTML to PDF generation.

vikash srivastava
  • 393
  • 2
  • 4
  • 16

3 Answers3

1

Earlier versions of PD4ML was not supporting RTL . You can refer this doc https://pd4ml.com/support/html-css-to-pdf-rendering-issues-f3/direction-rtl-not-working-t284.html. Recent versions of PD4ML supports RTL . Please , refer below link https://pd4ml.com/relnotes.htm .

vikash srivastava
  • 393
  • 2
  • 4
  • 16
0
public void setEncoding(String encoding) {
         if (encoding != null && !encoding.equals("iso-8859-1")) {
              this.encoding = encoding;
            }
    }

Change setEncoding method as

public void setEncoding(String encoding) {
             if (encoding != null && !encoding.equals("utf-8")) {
                  this.encoding = encoding;
                }
        }
Xihar
  • 103
  • 1
  • 12
0

Try adding the encoding to your pom.

<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
Maxdola
  • 1,562
  • 2
  • 10
  • 29