Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Missing characters in Arabic PDF creation

New Here ,
Dec 08, 2023 Dec 08, 2023

I am facing an issue while creating pdf using cfdocument tag where the content are Arabic characters. When I am printing the Arabic in web page(HTML) everything works fine, but when I put the same characters in pdf few ligature(joint letters) are missed out.

 

I have added the code below which creates the pdf in the same location where the file is run and display the content on screen. I have underlined the characters on screen display, which are missed out while rendering the texts in pdf. Is this a bug in cfdocument? Any help is much appreciated.

 

 

<cfprocessingdirective pageEncoding="utf-8">
<cfdocument name="TT" format="pdf" fontEmbed="Yes" margintop="1.1" marginbottom="0.5" backgroundVisible="Yes" pagetype="a4" orientation="portrait">
&#1575;&#1587;&#1605; &#1575;&#1604;&#1605;&#1575;&#1604;&#1603;<br>
&#1575;&#1604;&#1605;&#1576;&#1604;&#1594; &#1575;&#1604;&#1605;&#1587;&#1578;&#1581;&#1602; (&#1583;&#1585;&#1607;&#1605;)<br>
&#1585;&#1605;&#1586; &#1575;&#1604;&#1605;&#1578;&#1593;&#1575;&#1605;&#1604;<br>
&#1605;&#1585;&#1603;&#1586; &#1575;&#1604;&#1582;&#1583;&#1605;&#1577;<br>
</cfdocument>
 
 
<cfset currPath = expandPath("./") />
<cffile action="WRITE" nameconflict="overwrite" file="#currPath#TestArabic.pdf" output="#TT#" >
 
<font size="16" >&#1575;&#1587;&#1605; &#1575;<u>&#1604;&#1605;</u>&#1575;&#1604;&#1603;</font><br>
<font size="16" >&#1575;<u>&#1604;&#1605;</u>&#1576;&#1604;&#1594; &#1575;<u>&#1604;&#1605;</u>&#1587;&#1578;&#1581;&#1602; (&#1583;&#1585;&#1607;&#1605;)</font><br>
<font size="16" >&#1585;&#1605;&#1586; &#1575;<u>&#1604;&#1605;</u>&#1578;&#1593;&#1575;&#1605;&#1604;</font><br>
<font size="16" >&#1605;&#1585;&#1603;&#1586; &#1575;<u>&#1604;&#1582;</u>&#1583;&#1605;&#1577;</font><br><br>
 
**The underlined(ligature) characters are missing in pdf.
146
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 03, 2024 Apr 03, 2024
LATEST

I think you should use <cfhtmltopdf> instead of <cffile>. That is, something like

<cfhtmltopdf destination="#currPath#TestArabic.pdf" overwrite="yes" >
<font size="16" >&#1575;&#1587;&#1605; &#1575;<u>&#1604;&#1605;</u>&#1575;&#1604;&#1603;</font><br>
<font size="16" >&#1575;<u>&#1604;&#1605;</u>&#1576;&#1604;&#1594; &#1575;<u>&#1604;&#1605;</u>&#1587;&#1578;&#1581;&#1602; (&#1583;&#1585;&#1607;&#1605;)</font><br>
<font size="16" >&#1585;&#1605;&#1586; &#1575;<u>&#1604;&#1605;</u>&#1578;&#1593;&#1575;&#1605;&#1604;</font><br>
<font size="16" >&#1605;&#1585;&#1603;&#1586; &#1575;<u>&#1604;&#1582;</u>&#1583;&#1605;&#1577;</font><br><br>
</cfhtmltopdf>
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources