Skip to main content
Known Participant
September 18, 2023
Question

ColdFusion2021 font-family: Traditional Arabic output missing for some names.

  • September 18, 2023
  • 1 reply
  • 766 views

I am using ColdFusion2021.

In that using tag and font-family: Traditional Arabic;

<cfdocument format="pdf" orientation="landscape" margintop="2" pagetype="a4" localUrl = "true" fontembed="true">

<table class="tbl" border="1" align="center" width="100%" bordercolor="##AECEFF" style="font-size:16px;" cellspacing="0" cellpadding="5">

<tr>

<td>
<div align="right"><font style="font-family:Traditional Arabic;">#arabic_name#</font></div>
</td>

</tr>

</table>

</cfdocument>

some time some arabic name output showing blank from the list in the PDF.

If using some other font-family in that situation missing name shows but at the same time some words getting missing from the name.

Example: 

With Traditional Arabic font(Correct😞

عبد الرؤوف محمد

With this same font-name some name showing blank in PDF.

Without Traditional Arabic font(Wrong😞

عبد الرؤوف مد

This topic has been closed for replies.

1 reply

BKBK
Community Expert
Community Expert
September 18, 2023

When I ran the same code, I got the following PDF result (on ColdFusion 2021). Is the name correct here?

<cfprocessingdirective pageencoding="utf-8">

<cfset arabic_name="عبد الرؤوف محمد">

<cfdocument format="pdf" orientation="landscape" margintop="2" pagetype="a4" localUrl = "true" fontembed="true" >
<table class="tbl" border="1" align="center" width="100%" bordercolor="##AECEFF" style="font-size:16px;" cellspacing="0" cellpadding="5">
<tr>
<td>
<div align="right"><font style="font-family:Traditional Arabic;"><cfoutput>#arabic_name#</cfoutput></font></div>
</td>
</tr>
</table>
</cfdocument>
Known Participant
September 19, 2023

Thanks for your reply BKBK.

In the same context can you try this name.

<cfset arabic_name= "رام كومار موھانرام بالارا"/>

It will show blank in the PDF. 

BKBK
Community Expert
Community Expert
September 19, 2023

You could specify the UTF-8 encoding, but leave out the Traditional Arabic font. That is, somethinglike:

<cfprocessingdirective pageencoding="utf-8">

<cfset arabic_name= "رام كومار موھانرام بالارا"/>

<cfdocument format="pdf" orientation="landscape" margintop="2" pagetype="a4" localUrl = "true" fontembed="true" >
<table class="tbl" border="1" align="center" width="100%" bordercolor="##AECEFF" style="font-size:16px;" cellspacing="0" cellpadding="5">
<tr>
<td>
<div align="right"><cfoutput>#arabic_name#</cfoutput></div>
</td>
</tr>
</table>
</cfdocument>