Question
· Jan 16, 2023

PDF printing with Unicode characters

I'm trying to add the greater than or equal character on a ZEN PDF report and was wondering how and what code I can use Unicode to print it.

Is is as simple as using $c

Product version: IRIS 2022.1
$ZV: IRIS for Windows (x86-64) 2022.1 (Build 209)
Discussion (11)2
Log in or sign up to continue

Thank you.

I'm trying to embed in a table cell a string of text that needs the >= character as a single character.

The ZEN table :

<container ifexpression="%report.TestProfilePostInfoFlag(3)=1">
<table orient="col" class="borderless" width='#($g(^||Page("TotalRowWidth")))#in' group="PostInfoData3">
<item field="PostInfo" width='#($g(^||Page("TotalRowWidth")))#in' style='#(..Style("TestProfilePostInfoCell",3))#' stylecall="HighLight" styleparams="Zebra1" styleparamNames="Value"></item>
</table>
</container>
</table>
</table>

The code that populates this is :

 set r=""
 for {
 set r=$o(^||TestProfile("Table",p,"PostInfo",r))
 if r="" quit
 write !,"<PostInfoData"_p_">"
 set zebra=..Zebra(1) if zebra=0,PostSolidBackGround=1 set zebra=1
 set text=^||TestProfile("Table",p,"PostInfo",r)
 if (text=BlankChar)||($zstrip(text,"<>w")="") {set enh=100,text=BlankChar}
   elseif $l(text)<210 {set enh=..GetEnhancement(CDRCode,"TestProfile",p,0,text)+zebra}  
 else {set enh=zebra}
 write !,"<PostInfo>"_$zcvt(text,"O","XML")_"</PostInfo>"
 write !,"<Zebra1>"_enh_"</Zebra1>"
 write !,"</PostInfoData"_p_">"
     }

where ^||TestProfile("Table",p,"PostInfo",r) =  "* As defined by incident diabetic kidney disease (eGFR <60mL/min/1.73m"_$c(178)_" in the next four years. Note: If eGFR level at the time of the test is already <60mL/min/1.73m"_$c(178)_" , then the risk of a further decline in kidney function is defined as an eGFR decline >= 30% in the next four years."
 

It's the >= that I need to transform to the single character

I've seen Zen reports used extensively for Chinese content, so they can definitely handle the far reaches of the Unicode realm.

What happens if you do this?

write !,"<PostInfo>My GE: "_$c(8805)_"</PostInfo>"

or this?

write !,"<PostInfo>My GE: "_$zcvt($c(8805),"O","UTF8")_"</PostInfo>"

Some other things to check: