This forum is no longer open and is for reading/searching only.

Please use our new MachForm Community Forum instead.

MachForm Community Forums » MachForm 4

PDF Generated File does not support Chinese


  1. szzyp
    Member

    Hello

    I found the PDF cannot show any Chinese characters.. Please solve this issue!

    Thanks
    Yipeng

    Posted 8 years ago #
  2. szzyp
    Member

    bring this up again as 4.6 did not solve this

    Posted 8 years ago #
  3. yuniar

    The PDF should be able to display Chinese characters or any other UTF-8 characters.

    If your machform can't generate the correct PDF, try these:

    1) reupload the content of your "/machform/lib/dompdf/lib/fonts" folder from the original package. This folder contain the necessary fonts to display Chinese characters

    2) if the above doesn't solve the issue, edit your "machform/includes/helper-functions.php" file, search for this code around line 3751:

    if(strpos($entry_details_json, '\u') !== false){
    	$content_font_family = 'dejavu sans,Lucida Grande,Tahoma,Arial,Verdana,sans-serif';
    }

    remove the first and last line, to be like this:

    $content_font_family = 'dejavu sans,Lucida Grande,Tahoma,Arial,Verdana,sans-serif';

    MachForm Founder

    Posted 8 years ago #
  4. szzyp
    Member

    Both methods did not solve this issue. Chinese char is showing like a box.

    Here is a line of Chinese in case you would like to test it -
    你好这是测试的中文

    Thanks!

    Posted 8 years ago #

RSS feed for this topic

Reply