Question
· Oct 17, 2022

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.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
Discussion (3)1
Log in or sign up to continue

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.