Skip to content

Instantly share code, notes, and snippets.

@wpmudev-sls
Last active January 3, 2024 19:06
Show Gist options
  • Save wpmudev-sls/56acc25d08a9d5f04dedb3526deca13e to your computer and use it in GitHub Desktop.
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
<?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