Report render
Hello
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.Objectset report = $classmethod($piece(reportClass, ".cls"), "%New")
set report.RUID = RUIDset %response.ContentType = "application/pdf"
set sc = report.GenerateReportToStream(.stream, 2) return:$$$ISERR(sc) sc
do stream.OutputToDevice()
return $$$OK
Your help is appreciated.
Comments
Hello,
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?
Regards
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 - CyrillicExtract TrueType fontCRR35__C.TTFinto any gs font folderTo list gs font folders execute:gs -help, in Windows its usually%ProgramFiles%\gs\gsVERSION\fonts, in Linux/usr/share/ghostscript/fontsAdd MyFont info sourcing it fromCRR35__C.TTFinto 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.