Focal Point
[CLOSED] Displaying Dagger symbol in PDF report

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/931107621

May 26, 2009, 01:31 AM
krishkasi
[CLOSED] Displaying Dagger symbol in PDF report
Hi,
Greetings.
I have a requirement to display the dagger symbol (either signle or double) next to a field value in one my PDF report. But I do not know how to find the correct value to be used inside the HEXBYT function to do it. I have tried to generate the symbols through below snippet and did not see the dagger symbol.

Can any one of you help me?


-MRNOEDIT BEGIN
TABLE FILE CAR
PRINT
CAR NOPRINT
WHERE RECORDLIMIT EQ 1
HEADING CENTER
-SET &I=0;
-REPEAT ENDLOOP1 FOR &I FROM 0 TO 500
-SET &CURR_SYM = HEXBYT(&I,'A1');
"&I <+0>&CURR_SYM"
-ENDLOOP1
ON TABLE PCHOLD FORMAT PDF
END
-RUN
-MRNOEDIT END

This message has been edited. Last edited by: Kerry,


Regards,
Kasi Krishnan
WF 7.1.4 & WF 7.6.9: Databases - DB2, SQL Server 2000.
OS: Windows & AIX
May 26, 2009, 02:40 AM
Tony A
Kasi,

Read up on the posts about PDF and you'll notice that PDF only supports certain font sets depending upon your install of PDF, so you'll have to comprehend that first. Once you understand that check out sites on the internet that give character set conversion / value details. Easy to find if you are prepared to do some digging.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
May 26, 2009, 03:18 AM
<JG>
Both Dagger and Double Dagger are part of the standard Times font that is built into PDF
ASCII characters 134 and 135 respectively.

Why you cannot see them with your code I do not know, possibly add a style sheet and set TIMES as the font.
Also 256 is the maximum character allowed after that it divides by 256 and the character you get is the remainder

-SET &DAGGER=HEXBYT(134,'A1');
-SET &DOUBLE_DAGGER=HEXBYT(135,'A1');
TABLE FILE CAR
"&DAGGER &DOUBLE_DAGGER"
PRINT MODEL
COMPUTE DAGGER/A1=HEXBYT(134,'A1');
COMPUTE DOUBLE_DAGGER/A1=HEXBYT(135,'A1');
ON TABLE PCHOLD FORMAT PDF
END

This message has been edited. Last edited by: <JG>,
May 26, 2009, 11:34 AM
Darin Lee
quote:
PDF only supports certain font sets depending upon your install of PDF


I'm sure this was Tony's intended reference, but if you don't have the font set you need, you can add whatever additional font sets you need to your installation. Requires Type-1 fonset and some minor modifcations to the pdf.fmp file as documentented in the manuals. There are also several examples on the forum.


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
May 26, 2009, 11:56 AM
krishkasi
Hi JG,
Thank you so much for the inputs. I am getting question marks for 128 through 155. Might be related to the fontsets available.


Regards,
Kasi Krishnan
WF 7.1.4 & WF 7.6.9: Databases - DB2, SQL Server 2000.
OS: Windows & AIX
May 26, 2009, 03:05 PM
Doug
Also, be careful as it is possible that all of your users are using the same release / version of PDF. So, what you find may work for some may not work for others.
May 26, 2009, 03:54 PM
Darin Lee
Are you talking about the Reader version or the PDF version? In this case, as far as fonts being displayed, neither would matter. All the necessary metrics/code to display whatever font or character is used is self-contained in the PDF document created by WF and the version of PDF that it uses. For other functionality, the Acrobat Reader version may matter, but I have not seen issues yet as far as WF is concerned.


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
May 26, 2009, 05:28 PM
Waz
I'm pretty sure this was posted before.
DEFINE FILE SYSCOLUM
 CNTR/I9 WITH NAME = IF LAST CNTR EQ 0 THEN 32 ELSE LAST CNTR + 1 ;
 Cntr/I9 WITH NAME = CNTR - 32 ;
 Col/I9  WITH NAME = (Cntr / 30) + 1 ;
 Row/I9  WITH NAME = IMOD(Cntr, 30, 'I9') ;
END
TABLE FILE SYSCOLUM
   SUM CNTR 
       COMPUTE
       CHAR/A1 = HEXBYT(CNTR, 'A1') ;
ACROSS Col	NOPRINT
BY Row		NOPRINT
WHERE RECORDLIMIT EQ 224
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
UNITS=CM, PAGESIZE='A4', LEFTMARGIN=0.635000, RIGHTMARGIN=0.635000,
    TOPMARGIN=0.635000, BOTTOMMARGIN=0.635000, SQUEEZE=ON,
    ORIENTATION=LANDSCAPE, $
TYPE=REPORT, GRID=OFF, FONT=TIMES NEW ROMAN, $
ENDSTYLE
END



Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!