Scenario
While printing using Advanced PDF/HTML Template with special or lingual characters, some will not show on the printout. An example of these are Thai characters.
Solution
- Upload the .TTF font file in NetSuite.
Note: Make sure the Available Without Login is checked.
- Copy the third URL field on the uploaded File record and replace the ampersands symbols (&) with &
- In the custom template, use a link name declaration to specify the font to be used on the template
- Example:
<link name="" type="font" subtype="" src="" bytes="2" />
Note:
– Set the name to your preferred name.
– Set the subtype to “opentype”.
– Set the src to the modified URL.
- Navigate to Customization > Forms > Advance PDF/HTML Templates
- Preferred Advanced PDF/HTML Template: Click Edit / Customize
- Top Right Corner: Toggle Source Code
- In the CSS style block, specify on which HTML Element the Font should be implemented. To apply it to all the Elements, use asterisk (*)
- Example:
<?xml version="1.0"?><!DOCTYPE pdf PUBLIC "-//big.faceless.org//report" "report-1.1.dtd">
<pdf>
<head>
<link name="thai-font" type="font" subtype="opentype" src="https://tstdrv2055138.app.netsuite.com/core/media/media.nl?id=28&c=TSTDRV2055138&h=54778471199cdddca1ce&_xt=.ttf" bytes="2" />
<style type="text/css">* {
font-family: thai-font, sans-serif;
font-size: 9pt;
table-layout: fixed;
}
th {
font-weight: bold;
font-size: 8pt;
vertical-align: middle;
padding: 5px 6px 3px;
background-color: #e3e3e3;
color: #333333;
}
td {
padding: 4px 6px;
}
</style>
</head>
<body>
These?words?should?be?separated?by?Thai?characters.
</body>
</pdf>
Note: The TSTDRV### is the Account Number of the User.
- Click Save
Reference: https://suiteanswers.custhelp.com/app/answers/detail/a_id/49581/loc/en_US