"Enhance Your PDFs with Multilingual Capabilities in Net

When trying to display data in an advanced PDF with a mix of English and Chinese characters, I'm running into an issue where only the English characters are showing up. What can be done to ensure that the Chinese characters show up correctly as well?

Answer №1

Within NetSuite's system, the BFO library is utilized for PDF rendering. For detailed instructions on utilizing built-in fonts and embedding custom ones, refer to the User Guide starting from page 30.

In addition to the standard 5 fonts, users equipped with the appropriate Acrobat language version can access 7 additional fonts for displaying Chinese, Japanese, and Korean text. The font names include “stsong” (STSong-Light, simplified Chinese), “msung” (MSungLight, traditional Chinese), “mhei” (MHei-Medium, traditional Chinese), “heiseimin” (HeiseiMin-W3, Japanese), “heiseikakugo” (HeiseiKakuGo-W5, Japanese), “hygothic” (HYGoThic-Medium, Korean), and “hysmyeongjo” (HYSMyeongJo-Medium, Korean)

Additionally, explore the pre-existing NetSuite templates as they automatically integrate certain fonts based on the locale. Simply eliminating the <#if> statement surrounding the Chinese text may resolve any related issues.

<link name="NotoSans" type="font" subtype="truetype" src="${nsfont.NotoSans_Regular}" src-bold="${nsfont.NotoSans_Bold}" src-italic="${nsfont.NotoSans_Italic}" src-bolditalic="${nsfont.NotoSans_BoldItalic}" bytes="2" />
<#if .locale == "zh_CN">
    <link name="NotoSansCJKsc" type="font" subtype="opentype" src="${nsfont.NotoSansCJKsc_Regular}" src-bold="${nsfont.NotoSansCJKsc_Bold}" bytes="2" />
<#elseif .locale == "zh_TW">
    <link name="NotoSansCJKtc" type="font" subtype="opentype" src="${nsfont.NotoSansCJKtc_Regular}" src-bold="${nsfont.NotoSansCJKtc_Bold}" bytes="2" />
<#elseif .locale == "ja_JP">
    <link name="NotoSansCJKjp" type="font" subtype="opentype" src="${nsfont.NotoSansCJKjp_Regular}" src-bold="${nsfont.NotoSansCJKjp_Bold}" bytes="2" />
<#elseif .locale == "ko_KR">
    <link name="NotoSansCJKkr" type="font" subtype="opentype" src="${nsfont.NotoSansCJKkr_Regular}" src-bold="${nsfont.NotoSansCJKkr_Bold}" bytes="2" />
<#elseif .locale == "th_TH">
    <link name="NotoSansThai" type="font" subtype="opentype" src="${nsfont.NotoSansThai_Regular}" src-bold="${nsfont.NotoSansThai_Bold}" bytes="2" />
</#if>

Answer №2

To enable Chinese language support in your advanced PDF, simply upload the .ttf file containing the characters to the designated file cabinet. Then, reference it within the . I have personally tested this method and can confirm that it successfully works.

Answer №3

<link name="Amiri-font" type="font" subtype="opentype" src="https://system.eu2.netsuite.com/core/media/media.nl?id=6855&amp;c=xxx8839&amp;h=7cada88647a1f0c07899&amp;_xt=.ttf" src-bold="https://xxx8839-sb1.app.netsuite.com/core/media/media.nl?id=7532&amp;c=xxx8839&amp;h=97e9854d5b5e8f891e11&amp;_xt=.ttf" bytes="2" />

<style>
.fontA{
            font-size:14pt;
            font-family: Amiri-font, sans-serif;
            }
</style>

Here is an example of utilizing the Arabic font using a custom downloaded font file.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Activate the button to effortlessly load pages with a visually engaging animation

I have been facing a problem for the past couple of days. I need help with achieving a specific functionality on my website. When button1 is clicked, I want to load the page in a div class named "loadpage" with an animation coming from the left. Similarl ...

NodeJs: express wreaks havoc on the generated HTML markup

Similar Question: ExpressJS: how to output pretty html While using Express as my framework for node.js, everything is running smoothly except for one minor issue. When I view the page source by right-clicking on the browser, all my HTML code appears u ...

Tips for displaying the ampersand symbol correctly in XSLT without any issues

When I convert all instances of & to &amp; in my XML code, the XSLT compiles successfully. Now, as I style the XML into HTML, I encounter an issue when displaying text inside a textbox that has been processed by the XSLT. Specifically, the textbox ...

Resizing images for retina displays in Outlook (no img attributes required)

I am currently creating templates for an automation tool and am facing an issue with resizing retina images in Outlook. I am aware that typically, one would use image attributes such as style="max-width: 100px; width: 100%" to achieve this. The issue ar ...

What is the best way to showcase labels and values in distinct columns within a view?

I have set up a Drupal 7 view to showcase some user fields, opting for an unformatted list layout. However, I am unsatisfied with the current appearance. My goal is to arrange the field labels ("Name," "Age," and "Country") and their corresponding values ...

Updating form appearance with jQuery's $.ajax when submitting forms

This is an example of the list of forms on my page: http://jsfiddle.net/GSC3x/ While it functions well, having a lot of list items on the page can make it less user-friendly. I am looking to change the way forms are displayed after clicking on one of the ...

Creating organized layouts using Bootstrap for columns and rows

Struggling with formatting a modal as a novice front end coder. Apologies for the messy code! Currently using bootstrap columns and a card, but having trouble getting the second row to move up close to the first row. VIEW THE WEBSITE IMAGE HERE I'm ...

How can I update an image source using JavaScript in a Django project?

Is it possible to dynamically change the image src using onclick without relying on hard paths or Django template tags? I have concerns that this may not be best practice. How can I implement a method to inject/change the ""{% static 'indv_proj&b ...

A JavaScript code snippet that stores the total number of bytes read from a CSV file in a variable

I currently have a CSV file located on a web server that is regularly updated with numeric and string data of varying lengths. I am seeking a solution to calculate the total byte values of each row when reading the file, as the byte count is crucial due ...

Clicking on the element will delete the containing parent div

I'm attempting to remove a specific div when clicking on a link. The issue I'm facing is that there are multiple instances of the same div and link structure, and when I tried creating a function for it, it ends up removing all of the divs. $( ...

Creating a WordPress widget that links to a local file

Hey there, I've been attempting to utilize the text widget in order to link to a local file, but unfortunately, it's not working as expected, and I'm unsure of the reason why: Here is what I am using: <a href="file:///D:/" target="_blan ...

Is the width set to fill the entire partial screen?

I'm facing a dilemma: I want the darkest-gray bar at the bottom right (visible after running the code below) to stretch as far as the browser window allows without encroaching on the light-gray section on the left. Here's the code snippet: <d ...

Using jQuery to eliminate the final input field in a dynamic list

I'm struggling to figure out how to remove the last <div><input type="text" name="mytext[]"></div> even when using the "top" button for removal. Currently, when I create multiple fields and click the "remove" icon at the top of them, ...

Utilizing jQuery functions to toggle the visibility of the subsequent nested UL element within a menu

When the "section" is clicked, I want the next UL (sub-menu) to either disappear or reappear. I have tried using the jQuery next() function, but can't seem to select the element. Here is my attempt: $(".section").click(function() { $(this).next(&a ...

Using Python2.7 and HTMLParser to retrieve a string from HTML

In the process of developing an Alexa skill, I am restricted to using Python (2.7) libraries without access to BeautifulSoup4. Despite this limitation, I aim to extract a specific string ('104 spaces') from a larger HTML page that contains a cons ...

Encountering ERR_CERT_AUTHORITY_INVALID when trying to attach a YouTube video URL in Angular

I'm currently working on a project using Angular 8. One of the requirements is to display 6 YouTube videos in a modal popup. To achieve this, I have implemented the following code: This is my HTML file code: <iframe [src]="safeSrc1" widt ...

Converting a String to HTML-Formatted String in Swift 3

Is there a way to encode a string in Swift and replace all special characters with their corresponding HTML numbers? For example, consider the following string: var mystring = "This is my String & That's it." The special characters in the strin ...

If the value stored in $_SESSION['uname'] is not "teacher", redirect back to the homepage

I am currently working on a webpage and I want to restrict access to only users with the username "teacher". I came across this code snippet: <?php session_start(); if(!isset($_SESSION['uname'])){ header('location:(main p ...

Creating a blog "post" model in Ruby on Rails with CSS that can behave in two distinct ways

I am in the process of creating a blog using Ruby on Rails. The posts on my blog are generated from the Posts model, and I want them to exhibit two different behaviors. Currently, I have configured it so that a new post is automatically created every day. ...

Fixed top navbar in Bootstrap 4 remains collapsed, obscuring the content

I have tried numerous threads on Stack Overflow and also this one, but I still can't seem to get it right. My goal is to have a fixed navbar at the top using Bootstrap 4, but for some reason, the navbar keeps shifting upwards. I've even added pad ...