Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save alfredo-wpmudev/cc9fdeac62e78fbfb2a8d964ff561f5b to your computer and use it in GitHub Desktop.
Save alfredo-wpmudev/cc9fdeac62e78fbfb2a8d964ff561f5b 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