Japanese character are rendering as square bracket in pdf report

  • Hi sir ,
    Japanese character are rendering as square bracket in pdf report. I have seen few examples they were telling to install font packages This is my docker file. But when i try to add these font packages the error iam getting is apt-get not found. I think Docker image i am using is alphine based so we can't use apt-get because it's Ubuntu's package manager. So i try to install font package using apk add but still it doesn't works.
    Could you please reply with a solution?


    Error :-


  • I didn't try to fiddle with fonts in alpine yet.... cant you use the jsreport full image?
    It's based on ubuntu and already has fonts installed.

    docker run -d -p 5488:5488 --restart always jsreport/jsreport:2.11.0

  • If you dont mind could you please show me one example with ubuntu based docker file for jsreport?

  • This is official jsreport "full" dockerfile, based on ubuntu

  • Hi sir ,

    I have modified my dockerfile. Now japanese is rendering in pdf report (My docker image is still alphine. i didnt chaged to ubuntu because you told me that fonts were already installed in ubudu due the issue in japanese language while rendering the report )
    Below i have added the the link that i refer to render the japanese language in pdf report , in that link they were asked to install package called wqy-zenhei so i added the below command in docker file
    RUN apk add wqy-zenhei --update-cache --repository https://nl.alpinelinux.org/alpine/edge/testing.
    Now report is rendering in japanese language.

    My Question is:-

    • Is this solution is correct inorder to render japanese language in pdf report for alphine based docker image?

    • Is there any problem will occur in future to the fonts of report?

    Docker File:------




  • RUN apk add wqy-zenhei --update-cache --repository https://nl.alpinelinux.org/alpine/edge/testing.

    Yes, this looks like a proper solution, thank you for sharing.

    One note, these two lines seems redundant, because it runs already in the image you inherit FROM

    RUN npm cache clean -f
    RUN npm install jsreport@2.11.0

  • Thank you sir.

Log in to reply

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.