In this blog, I will be showing you how you can change/add a new language in your advanced PDF Layout. With the help of some quick changes in our PDF Layout code you can achieve it.
– NetSuite Account
– Knowledge of Advanced PDF
– Knowledge of BFO Tags
– Knowledge of Freemarker
This article will not cover the PDF creation part, assuming that you are familiar with it and freemarker.
For Instance, let’s assume Arabic language as our other language that we want in our layout. Also, let’s assume that there is a PDF Layout which needs to have Arabic text/characters on it.
By default, ‘NotoSans’ and English fonts (Regular, Bold, Italic, BoldItalic) are available on the pdf layout. If Arabic text is used without importing Arabic font-family the layout won’t show anything in the layout. It will show blank space.
To have a pdf layout in NetSuite which have some text in Arabic font-family.
Enable Advanced PDF/HTML Template from ‘Enable Features’.
Download that font family from google-fonts and place the .ttf file in NetSuite’s file cabinet. Separate files will be available for regular, bold, italic and bold-italic fonts. You can refer then all in you pdf.
Copy the link of that file from file cabinet and refer that file in you advanced pdf.
Use ‘link’ tag to refer that font-family in you pdf layout in ‘head’ tag. After this you can use Arabic font anywhere in you pdf.
Here is the piece of snippet to that.
<link name=”arabic” type=”font” subtype=”opentype” src=”FONT_URL” src-italic=”ITALIC_FONT_URL” src-bold=”BOLD_FONT_URL” srcbolditalic=”BOLDITALIC_FONT_HERE” bytes=”2″ />