Omar Ali Ateen · Oct 17, 2022

Report render


I have a class to render reports as  pdf. My problem that arabic characters in report replaced with ####. 

Please find my code below

#dim stream as %Stream.Object set report = $classmethod($piece(reportClass, ".cls"), "%New")
set report.RUID = RUID set %response.ContentType = "application/pdf"

set sc = report.GenerateReportToStream(.stream, 2) return:$$$ISERR(sc) sc
do stream.OutputToDevice()

return $$$OK

Your help is appreciated.

Product version: IRIS 2022.1
0 141
Discussion (3)1
Log in or sign up to continue


Based on your code, it appears that you are using Zen Reports. In order for Zen Reports to address certain character displays, the appropriate font needs to be specified within the report as well as having the font be loaded into Adobe (e.g. Adobe Arabic).

thanks Julie

Thank you Julie for your response

My zen report is working fine before generate to stream, how to specify arabic font to stream?


Here's how:

  • Install ghostscript system-wide (Linix: apt install ghostscript, Windows)
  • Download fonts, for example here's some cyrillic fonts (you need another font - it's just an example): PT Courier - Cyrillic
  • Extract TrueType font CRR35__C.TTF into any gs font folder
  • To list gs font folders execute: gs -help, in Windows its usually %ProgramFiles%\gs\gsVERSION\fonts, in Linux /usr/share/ghostscript/fonts
  • Add MyFont info sourcing it from CRR35__C.TTF into gs font table: /MyFont (CRR35__C.TTF) ;
  • Font table in Windows: %ProgramFiles%\gs\gsVERSION\lib\Fontmap.GS, Linux: /usr/share/ghostscript/current/Resource/Init/Fontmap.GS

Nevermind, that's only if you want to use gs directly. For FOP follow these instructions.