Export FlexGrid to PDF Word wrap problem in version 5.20192.631

Posted by: nguyenvietloc on 16 January 2021, 2:08 am EST

    • Post Options:
    • Link

    Posted 16 January 2021, 2:08 am EST - Updated 3 October 2022, 5:47 am EST

    Hi,

    I’m using AngularJs and wijmo versions 5.20192.631

    When export FlexGrid to PDF, Japanese text does not wrap text like the display in the browser.

    I want to set font dynamic at runtime,

    so in the formatItem function, I add the below code to export Japanese properly

    e.style.font.family = 'ipaexg';
    

    I created a sample that reproduces the problem. (using version 5.20192.631)

    https://jsfiddle.net/L_Nguyen/0t6Lm53f/49/

    See image below

    If in CSS hard code as below, Japanese text export properly. (But I WANT TO SET FONT DYNAMIC AT RUNTIME, not hard code)

    .wj-cell {
      font-family:'ipaexg';
    }
    

    At the latest version, it works OK.

    https://jsfiddle.net/L_Nguyen/netf04x7/36/

    Can you help me to fix the problem in version 5.20192.631 ?

    Thank you.

  • Posted 17 January 2021, 7:46 pm EST

    Hi,

    You may set the fontFamily and fontSize for the complete FlexGrid on ButtonClick event. It would allow you to change the fontFamily dynamically.

    Please refer to the updated sample for reference:

    https://jsfiddle.net/u6f05ps7/

    Regards,

    Manish Gupta

  • Posted 18 January 2021, 1:12 am EST

    Add two lines of code below, it works OK.

    theGrid.hostElement.style.fontFamily="ipaexg";
    theGrid.hostElement.style.fontSize="10px";
    

    Thank you for your support.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels