Arabic content is displaying with ? in generated pdf.
I have used HTMLtoPDF ootb activity for generating pdf from arabic html stream.
I have passed Param.pyPDFFontsDirectory with custom arabic font directory and param.pyPDFEmbedFont value to true still generated pdf is displaying with ?. Could you please suggest the solution.

  • siva
    When you import the language packs, Pega automatically does import all the required fonts. We just need to configure our code to use those fonts.

    Follow the below steps and let us know if it works,

    1) Make sure the Arabic language pack is installed in your instance.

    2) Pass the below parameters when you invoke HTMLToPDF activity.
    Param.pyPDFFontsDirectory - Your server library fonts directory [In our scenario it is D:\PRPCPersonalEdition\jre1.8.0_121\lib\fonts]
    Param.pyPDFEmbedFont - "true"

    3) Now run your scenario and you should be seeing the actual content in the generated PDF.

    Let us know if this helps or in case if you have any further questions.

siva
Can you send us the screenshot of the generated pdf.

We want to see if '?' is coming along with the actual Arabic content or the pdf only has '?' [corrupted values]

    Entire pdf is appearing with corrupted values[i.e. [?]

      siva
      faced the similar issue. Just add the Arabic font (.woff or .ttf file) in your web server and restart the server. Or else may be you can upload the Arabic font in some binary file and can refer in required file with src tag.

      Superman I tried the same way but same corrupted values appearing. Could you please provide the steps for resolving this issue.

        siva
        When you import the language packs, Pega automatically does import all the required fonts. We just need to configure our code to use those fonts.

        Follow the below steps and let us know if it works,

        1) Make sure the Arabic language pack is installed in your instance.

        2) Pass the below parameters when you invoke HTMLToPDF activity.
        Param.pyPDFFontsDirectory - Your server library fonts directory [In our scenario it is D:\PRPCPersonalEdition\jre1.8.0_121\lib\fonts]
        Param.pyPDFEmbedFont - "true"

        3) Now run your scenario and you should be seeing the actual content in the generated PDF.

        Let us know if this helps or in case if you have any further questions.

          Thanks it worked

            Write a Reply...

            -An Initiative Of OneStopPega- Love our work? Support Us🖤