Ensuring Correct RTL Display for Mixed Arabic and English Text in NetSuite Advanced PDF Templates

When generating PDF documents in NetSuite using Advanced PDF templates, you might encounter challenges when displaying mixed Arabic and English text. While Arabic text should naturally render from right to left (RTL), embedding English text within Arabic strings can disrupt this flow, causing display issues. Simply applying dir=”rtl” or direction: rtl; in your HTML styling… Continue reading Ensuring Correct RTL Display for Mixed Arabic and English Text in NetSuite Advanced PDF Templates

Populate the value from linked custom record in invoice PDF

The following FreeMarker code can be used in an Advanced PDF/HTML template to retrieve and display values from a linked custom record on the invoice PDF. <#assign customRecord = record.custbody6>    <#– Fetch the value from the custom record –>    <#assign customFieldValue = customRecord.custrecord126>    <table style=”width: 100%; margin-top: 10px;”>    <tr><td class=”addressheader” colspan=”3″><b>Subsidiary Bank Account Details</b></td></tr>    <tr> <td><b>Bank… Continue reading Populate the value from linked custom record in invoice PDF

Text Stretching Issues in PDF Template Table Cells

When generating PDF documents with table cells, developers may encounter an issue where text characters appear stretched across the available cell space. This formatting irregularity can affect the document’s professional appearance and readability. Solution The solution involves implementing proper HTML structure within the table cell by encapsulating the data within paragraph (<p>) tags. Here’s the… Continue reading Text Stretching Issues in PDF Template Table Cells

Upload and Use True Type Font (TTF) File in an Advanced PDF/HTML Template

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… Continue reading Upload and Use True Type Font (TTF) File in an Advanced PDF/HTML Template

Bar Code Types in Advanced Templates

The following bar code algorithms are supported by advanced templates and the BFO report generator. For more information about each bar code type, see http://bfo.com/products/report/docs/userguide.pdf. CodeType:aztec Type: 2D matrix Supported Characters: Full ASCII FNC1 and ESI control codes Length: 12 — 3832 CodeType: codabar Type: Linear Supported Characters: Numbers 0–9 Symbols : — . $… Continue reading Bar Code Types in Advanced Templates

Make the first line of address bold in advanced pdf template

Scenario: How to make the first line of the address bold through xml? Solution: <span style=”font-size:10px;line-height:2″>Consignee (Ship to)</span><br /><br/> <#assign shipaddress = record.shipaddress>   <#assign shipaddressLines = shipaddress?split(“<br />”)>     <#assign x = 1>     <#list shipaddressLines as line>  <#if x == 1>         <b> ${line}</b><br/>     <#assign x = x+1/>     <#else>     <span> ${line}</span><br/>     </#if>   </#list>

Handling Conditional Statements in NetSuite Freemarker Advanced PDF Templates: Avoiding Errors with > and Other Operators

Handling Conditional Statements in NetSuite Freemarker Advanced PDF Templates: Avoiding Errors with > and Other Operators When working with conditional statements in NetSuite Advanced PDF Templates using Freemarker, improper use of comparison operators like > can lead to errors. These errors often occur because Freemarker may misinterpret symbols like > as part of HTML tags.… Continue reading Handling Conditional Statements in NetSuite Freemarker Advanced PDF Templates: Avoiding Errors with > and Other Operators

Barcode quite zone and Alignment in PDF

The quiet zone in a barcode is an empty margin of white space around the barcode. It is essential for the barcode scanner to properly detect and decode the barcode. The quiet zone ensures that the scanner can distinguish the barcode from its surroundings. The width of the quiet zone typically depends on the barcodes… Continue reading Barcode quite zone and Alignment in PDF

Change the Version of the Generated Advanced PDF Template

There are instances that user needs to change the PDF version to comply with compatibility in different versions of PDF reader. Navigate to Customization > Forms > Advanced PDF/HTML Templates Preferred PDF Template: Click Edit Inside the head tag of the template, add the meta tag as shown below (Acrobat5 is for PDF version 1.4):… Continue reading Change the Version of the Generated Advanced PDF Template

Dynamically change the font size based on contents’ length

To dynamically adjust the font size based on the length of the content generated in a PDF template.  <#list itemData as label>       <#assign contentLength = (label.length)?number />       <#if contentLength gt 220>         <#assign fontSize = 2.4>       <#elseif contentLength gt 200>         <#assign fontSize = 2.6>       <#elseif contentLength gt 170>         <#assign fontSize = 2.8>       <#elseif contentLength gt 140>… Continue reading Dynamically change the font size based on contents’ length