Focal Point
Cannot get HEXBYT to work in PDF [SOLVED]

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

October 27, 2016, 09:19 PM
BethB
Cannot get HEXBYT to work in PDF [SOLVED]
I'm trying to create the registered trademark symbol (R with circle around it) in a PDF using HEXBYT and it will not work for me. Below is some sample code using the CAR file.

TABLE FILE CAR
PRINT
CAR.COMP.CAR NOPRINT
CAR.CARREC.MODEL NOPRINT
COMPUTE REGMARK/A1 = HEXBYT(174, 'A1'); NOPRINT
HEADING
"Car name
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/endeflt.sty,
$
TYPE=HEADING,LINE=1,OBJECT=TEXT,SIZE=8,COLOR=RGB(79 85 89),STYLE=NORMAL,FONT='ARIAL',$
TYPE=HEADING,LINE=1,OBJECT=FIELD,ITEM=1,SIZE=8,COLOR=RGB(79 85 89),STYLE=BOLD,FONT='ARIAL',$

ENDSTYLE
END

Not sure why it's not posting correctly above, but in the HEADING after "Car name" there is also a less than sign (<) with REGMARK after it and then the ending quote.

Here is a screen shot of what the output looks like.

Screenshot: Car name Þ

Instead of the trademark it is displaying that funny symbol after Car name.

Anyone have any suggestions as to why HEXBYT(174, 'A1') isn't working correctly?

Thanks!!!

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


WebFOCUS 8
Windows, All Outputs
October 27, 2016, 09:38 PM
Waz
This will be very much related to the font you are using for PDF.

The R symbol may not be at char 174.

Not sure if it is posted in the forum, but I built a simple PDF report for all chars from 32 up to 255 I think.

If its posted in the forum, run it against your ARIAL font and see what comes out.

I don't think I have access to it anymore, though


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!

October 27, 2016, 10:00 PM
BethB
Thanks Waz!! I couldn't find your PDF example, but created my own and found the correct number. You are brilliant as always. Smiler

Thanks,
Beth.


WebFOCUS 8
Windows, All Outputs
October 27, 2016, 10:08 PM
Waz
Hi Beth,

Perhaps you could post the code of your one.

May even make it into the tips and techniques.


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!

October 27, 2016, 10:09 PM
Waz
Oh, and FYI, please add [SOLVED] or [CLOSED] to the title of your first post in this thread.


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!

October 27, 2016, 10:17 PM
BethB
Thanks for the info...this is the first time I've posted anything.

I ran the code below and found the correct value I was looking for. On a side note, it did not match any of the ASCII charts I had looked at.

Again thanks for pointing me in the right direction.

TABLE FILE CAR
PRINT
CAR.COMP.CAR NOPRINT
CAR.CARREC.MODEL NOPRINT
COMPUTE REGMARK/A1 = HEXBYT(165, 'A1'); AS '165'
COMPUTE REGMARK/A1 = HEXBYT(166, 'A1'); AS '166'
COMPUTE REGMARK/A1 = HEXBYT(167, 'A1'); AS '167'
COMPUTE REGMARK/A1 = HEXBYT(168, 'A1'); AS '168'
COMPUTE REGMARK/A1 = HEXBYT(169, 'A1'); AS '169'
COMPUTE REGMARK/A1 = HEXBYT(170, 'A1'); AS '170'
COMPUTE REGMARK/A1 = HEXBYT(171, 'A1'); AS '171'
COMPUTE REGMARK/A1 = HEXBYT(172, 'A1'); AS '172'
COMPUTE REGMARK/A1 = HEXBYT(173, 'A1'); AS '173'
COMPUTE REGMARK/A1 = HEXBYT(174, 'A1'); AS '174'
COMPUTE REGMARK/A1 = HEXBYT(175, 'A1'); AS '175'
COMPUTE REGMARK/A1 = HEXBYT(176, 'A1'); AS '176'
COMPUTE REGMARK/A1 = HEXBYT(177, 'A1'); AS '177'
COMPUTE REGMARK/A1 = HEXBYT(178, 'A1'); AS '178'
COMPUTE REGMARK/A1 = HEXBYT(179, 'A1'); AS '179'
COMPUTE REGMARK/A1 = HEXBYT(180, 'A1'); AS '180'



HEADING
"HEXBYT VALUES"
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/endeflt.sty,
$
TYPE=HEADING,LINE=1,OBJECT=TEXT,SIZE=8,COLOR=RGB(79 85 89),STYLE=NORMAL,FONT='ARIAL',$
TYPE=HEADING,LINE=1,OBJECT=FIELD,ITEM=1,SIZE=8,COLOR=RGB(79 85 89),STYLE=BOLD,FONT='ARIAL',$

ENDSTYLE
END


WebFOCUS 8
Windows, All Outputs
October 29, 2016, 01:50 PM
Danny-SRL
Using the MacGuyver file FSEQ, this does the trick:
  
-* File pdfhex.fex
TABLE FILE FSEQ
PRINT ORDER AS DEC
COMPUTE HEX/A1=HEXBYT(ORDER,'A1');
WHERE ORDER FROM 32 TO 255;
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
GRID=ON, FONT=ARIAL,
$
ENDSTYLE
END



Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF