Last active
January 3, 2024 19:06
-
-
Save wpmudev-sls/56acc25d08a9d5f04dedb3526deca13e to your computer and use it in GitHub Desktop.
[Forminator Pro] - Fix weird characters on Forminator PDF when language is asian
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: [Forminator Pro] Fix weird characters on Forminator PDF when language is asian | |
* Description: Fixes weird characters on Forminator PDF when language is asian | |
* Author: Prashant @ WPMUDEV | |
* Task: SLS-5220 | |
* Author URI: https://premium.wpmudev.org | |
* License: GPLv2 or later | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) { | |
exit; // Exit if accessed directly. | |
} | |
add_filter( 'forminator_pdf_config', 'wpmudev_fix_asian_characters_pdf', 10, 2 ); | |
function wpmudev_fix_asian_characters_pdf( $config, $settings ) { | |
$config['useAdobeCJK'] = true; | |
$config['autoScriptToLang'] = true; | |
$config['autoLangToFont'] = true; | |
return $config; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment