Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SHARING] Truncating text in the heading of a PDF document

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SHARING] Truncating text in the heading of a PDF document
 Login/Join
 
Expert
posted
I had an issue where some variable text was placed on the right side of the page.

Unfortunately some of the text was so long that it flowed off the page.

I could not wrap the text, so I had to clip it. With a proportional font, this becomes quite difficult.

Setting SQUEEZE or WIDTH does not work, in fact SQUEEZE only wraps.

Here is my solution.

The basic idea is to work out the space needed for the text to fit in, and the only way I could think of to do this is to check the fonts AFM file.

This file has the width of wach character.

The conversion from the AFM files units to centimeters was quite simple.

The formula is: character width * font size / 1000 / 2.83464566929

Adobe states that there are 2.83464566929 points per millimeter.

By adding up each characters width, and checking to see when the size goes over a specified limit, then the character string could be truncated to a width that would not flow off the page.

I also found that is was quite easy to add continuation characters like ... to the string.

Below is sample code.

The font and style needs to be specified, as well at the space available for the string.

The define function is also set to 100 characters, but could be increased.

The code should work on Windows and Unix, and has been tested on 7.1.6, 7.6.6, 7.6.9 and 7.6.11.

-SET &Font = 'Arial' ;
-SET &Style= 'Normal' ;

-SET &OS_Dlm = DECODE &FOCMODE('WINNT' '\' ELSE '/') ;

-SET &Font = UPCASE(&Font.LENGTH,&Font,'A&Font.LENGTH') ;
-SET &Style= UPCASE(&Style.LENGTH,&Style,'A&Style.LENGTH') ;

-SET &Home   = FGETENV(7,'EDAHOME',70,'A70') ;
-SET &Home   = TRUNCATE(&Home) ;
-SET &SubDir = &OS_Dlm | 'nls' ;
-SET &PDFTmp = &OS_Dlm | 'pdf.fmp' ;

STATE &Home..&SubDir..&PDFTmp

-RUN

-SET &SubDir = IF &RETCODE EQ -1 THEN &OS_Dlm | 'etc' ELSE &SubDir ;

FILEDEF PDFTMP DISK &Home..&SubDir..&PDFTmp (LRECL 100 RECFM V

-RUN

-* Write out a master to read the BSB_ACC list
EX -LINES 4 EDAPUT MASTER,PDFTMP,CV,FILE
FILENAME=PDFTMP, SUFFIX=FIX,$
SEGNAME=PDFTMP, $
  FIELD=LINE       ,ALIAS=  ,A100 ,A100 ,$

-RUN

DEFINE  FILE PDFTMP
 UCLINE/A100 = UPCASE(100,LINE,'A100') ;
 MetricsStp1/A70 = GETTOK(LINE,100,3,',',70,'A70') ;
 MetricsStp2/A70 = GETTOK(MetricsStp1,70,2,'=',70,'A70') ;
 MetricsFile/A70 = GETTOK(MetricsStp2,70,1,' ',70,'A70') ;
 Code/A110       = '-SET &|MetricsFile = ''&OS_Dlm..etc&OS_Dlm..' || LOCASE(70,MetricsFile,'A70') || '.afm'';' ;
END
TABLE   FILE PDFTMP
 PRINT  
        Code

 WHERE  UCLINE CONTAINS 'FONT=&Font,'
 WHERE  UCLINE CONTAINS 'STYLE=&Style,'

 ON     TABLE SAVE AS FEX_FMF

END

-RUN

-INCLUDE FEX_FMF

FILEDEF FNT_MTRX DISK &Home..&MetricsFile (LRECL 80 RECFM V

-RUN

-* Write out a master to read the BSB_ACC list
EX -LINES 4 EDAPUT MASTER,FNT_MTRX,CV,FILE
FILENAME=FNT_MTRX, SUFFIX=FIX,$
SEGNAME=FNT_MTRX, $
  FIELD=LINE       ,ALIAS=  ,A80 ,A80 ,$

-RUN

DEFINE  FILE FNT_MTRX
 RowCntr/I9   = LAST RowCntr + 1 ;
 StrtRow/I9   = IF LINE CONTAINS 'StartCharMetrics' THEN RowCntr + 1 ELSE 0 ;
 StopRow/I9   = IF LINE CONTAINS 'StartCharMetrics' THEN RowCntr + EDIT(GETTOK(LINE,80,2,' ',4,'A4')) ELSE 0 ;
 Chr1/A10     = GETTOK(LINE,80,1,';',10,'A10') ;
 CHARNO/I9    = EDIT(GETTOK(Chr1,10,2,' ',10,'A10')) ;
 CHARACTER/A1 = HEXBYT(CHARNO,'A1') ;
 Wdth1/A10    = GETTOK(LINE,80,2,';',10,'A10') ;
 WIDTH/A9     = GETTOK(Wdth1,10,2,' ',9,'A9') ;

END

TABLE   FILE FNT_MTRX
 SUM    
        MAX.StrtRow                                                     NOPRINT
        MAX.StopRow                                                     NOPRINT
 PRINT  
        COMPUTE Chr1/A10     = GETTOK(LINE,80,1,';',10,'A10') ;         NOPRINT
        COMPUTE CHARNO/I9    = EDIT(GETTOK(Chr1,10,2,' ',10,'A10')) ;
        COMPUTE COMMA/A1     = ',' ;
        COMPUTE CHARACTER/A2 = HEXBYT(CHARNO,'A1') ;                    NOPRINT
        COMPUTE Wdth1/A10    = GETTOK(LINE,80,2,';',10,'A10') ;         NOPRINT
        COMPUTE WIDTH/P9     = EDIT(GETTOK(Wdth1,10,2,' ',9,'A9')) ;

 BY     TOTAL CHARACTER NOPRINT

 WHERE  TOTAL RowCntr GE MAX.StrtRow
          AND RowCntr LE MAX.StopRow
          AND CHARNO  GT 0

 ON     TABLE HOLD AS FNT_MTRC FORMAT ALPHA
 ON     TABLE SET HOLDLIST PRINTONLY

END

-RUN

-******************************************************************************

DEFINE FUNCTION F_ST_TRM/A100 (STRING/A100,POINT_SIZE/I9,SPACE/P6.3,
                               CONTCHAR/A1,CONTCOUNT/I9)

 STR_LEN/I9  = ARGLEN(100,STRING,'I9') ;

 BYTE_001/I9 = BYTVAL(SUBSTR(100,STRING,001,001,1,'A1'),'I3') ;
 BYTE_002/I9 = BYTVAL(SUBSTR(100,STRING,002,002,1,'A1'),'I3') ;
 BYTE_003/I9 = BYTVAL(SUBSTR(100,STRING,003,003,1,'A1'),'I3') ;
 BYTE_004/I9 = BYTVAL(SUBSTR(100,STRING,004,004,1,'A1'),'I3') ;
 BYTE_005/I9 = BYTVAL(SUBSTR(100,STRING,005,005,1,'A1'),'I3') ;
 BYTE_006/I9 = BYTVAL(SUBSTR(100,STRING,006,006,1,'A1'),'I3') ;
 BYTE_007/I9 = BYTVAL(SUBSTR(100,STRING,007,007,1,'A1'),'I3') ;
 BYTE_008/I9 = BYTVAL(SUBSTR(100,STRING,008,008,1,'A1'),'I3') ;
 BYTE_009/I9 = BYTVAL(SUBSTR(100,STRING,009,009,1,'A1'),'I3') ;
 BYTE_010/I9 = BYTVAL(SUBSTR(100,STRING,010,010,1,'A1'),'I3') ;
 BYTE_011/I9 = BYTVAL(SUBSTR(100,STRING,011,011,1,'A1'),'I3') ;
 BYTE_012/I9 = BYTVAL(SUBSTR(100,STRING,012,012,1,'A1'),'I3') ;
 BYTE_013/I9 = BYTVAL(SUBSTR(100,STRING,013,013,1,'A1'),'I3') ;
 BYTE_014/I9 = BYTVAL(SUBSTR(100,STRING,014,014,1,'A1'),'I3') ;
 BYTE_015/I9 = BYTVAL(SUBSTR(100,STRING,015,015,1,'A1'),'I3') ;
 BYTE_016/I9 = BYTVAL(SUBSTR(100,STRING,016,016,1,'A1'),'I3') ;
 BYTE_017/I9 = BYTVAL(SUBSTR(100,STRING,017,017,1,'A1'),'I3') ;
 BYTE_018/I9 = BYTVAL(SUBSTR(100,STRING,018,018,1,'A1'),'I3') ;
 BYTE_019/I9 = BYTVAL(SUBSTR(100,STRING,019,019,1,'A1'),'I3') ;
 BYTE_020/I9 = BYTVAL(SUBSTR(100,STRING,020,020,1,'A1'),'I3') ;
 BYTE_021/I9 = BYTVAL(SUBSTR(100,STRING,021,021,1,'A1'),'I3') ;
 BYTE_022/I9 = BYTVAL(SUBSTR(100,STRING,022,022,1,'A1'),'I3') ;
 BYTE_023/I9 = BYTVAL(SUBSTR(100,STRING,023,023,1,'A1'),'I3') ;
 BYTE_024/I9 = BYTVAL(SUBSTR(100,STRING,024,024,1,'A1'),'I3') ;
 BYTE_025/I9 = BYTVAL(SUBSTR(100,STRING,025,025,1,'A1'),'I3') ;
 BYTE_026/I9 = BYTVAL(SUBSTR(100,STRING,026,026,1,'A1'),'I3') ;
 BYTE_027/I9 = BYTVAL(SUBSTR(100,STRING,027,027,1,'A1'),'I3') ;
 BYTE_028/I9 = BYTVAL(SUBSTR(100,STRING,028,028,1,'A1'),'I3') ;
 BYTE_029/I9 = BYTVAL(SUBSTR(100,STRING,029,029,1,'A1'),'I3') ;
 BYTE_030/I9 = BYTVAL(SUBSTR(100,STRING,030,030,1,'A1'),'I3') ;
 BYTE_031/I9 = BYTVAL(SUBSTR(100,STRING,031,031,1,'A1'),'I3') ;
 BYTE_032/I9 = BYTVAL(SUBSTR(100,STRING,032,032,1,'A1'),'I3') ;
 BYTE_033/I9 = BYTVAL(SUBSTR(100,STRING,033,033,1,'A1'),'I3') ;
 BYTE_034/I9 = BYTVAL(SUBSTR(100,STRING,034,034,1,'A1'),'I3') ;
 BYTE_035/I9 = BYTVAL(SUBSTR(100,STRING,035,035,1,'A1'),'I3') ;
 BYTE_036/I9 = BYTVAL(SUBSTR(100,STRING,036,036,1,'A1'),'I3') ;
 BYTE_037/I9 = BYTVAL(SUBSTR(100,STRING,037,037,1,'A1'),'I3') ;
 BYTE_038/I9 = BYTVAL(SUBSTR(100,STRING,038,038,1,'A1'),'I3') ;
 BYTE_039/I9 = BYTVAL(SUBSTR(100,STRING,039,039,1,'A1'),'I3') ;
 BYTE_040/I9 = BYTVAL(SUBSTR(100,STRING,040,040,1,'A1'),'I3') ;
 BYTE_041/I9 = BYTVAL(SUBSTR(100,STRING,041,041,1,'A1'),'I3') ;
 BYTE_042/I9 = BYTVAL(SUBSTR(100,STRING,042,042,1,'A1'),'I3') ;
 BYTE_043/I9 = BYTVAL(SUBSTR(100,STRING,043,043,1,'A1'),'I3') ;
 BYTE_044/I9 = BYTVAL(SUBSTR(100,STRING,044,044,1,'A1'),'I3') ;
 BYTE_045/I9 = BYTVAL(SUBSTR(100,STRING,045,045,1,'A1'),'I3') ;
 BYTE_046/I9 = BYTVAL(SUBSTR(100,STRING,046,046,1,'A1'),'I3') ;
 BYTE_047/I9 = BYTVAL(SUBSTR(100,STRING,047,047,1,'A1'),'I3') ;
 BYTE_048/I9 = BYTVAL(SUBSTR(100,STRING,048,048,1,'A1'),'I3') ;
 BYTE_049/I9 = BYTVAL(SUBSTR(100,STRING,049,049,1,'A1'),'I3') ;
 BYTE_050/I9 = BYTVAL(SUBSTR(100,STRING,050,050,1,'A1'),'I3') ;
 BYTE_051/I9 = BYTVAL(SUBSTR(100,STRING,051,051,1,'A1'),'I3') ;
 BYTE_052/I9 = BYTVAL(SUBSTR(100,STRING,052,052,1,'A1'),'I3') ;
 BYTE_053/I9 = BYTVAL(SUBSTR(100,STRING,053,053,1,'A1'),'I3') ;
 BYTE_054/I9 = BYTVAL(SUBSTR(100,STRING,054,054,1,'A1'),'I3') ;
 BYTE_055/I9 = BYTVAL(SUBSTR(100,STRING,055,055,1,'A1'),'I3') ;
 BYTE_056/I9 = BYTVAL(SUBSTR(100,STRING,056,056,1,'A1'),'I3') ;
 BYTE_057/I9 = BYTVAL(SUBSTR(100,STRING,057,057,1,'A1'),'I3') ;
 BYTE_058/I9 = BYTVAL(SUBSTR(100,STRING,058,058,1,'A1'),'I3') ;
 BYTE_059/I9 = BYTVAL(SUBSTR(100,STRING,059,059,1,'A1'),'I3') ;
 BYTE_060/I9 = BYTVAL(SUBSTR(100,STRING,060,060,1,'A1'),'I3') ;
 BYTE_061/I9 = BYTVAL(SUBSTR(100,STRING,061,061,1,'A1'),'I3') ;
 BYTE_062/I9 = BYTVAL(SUBSTR(100,STRING,062,062,1,'A1'),'I3') ;
 BYTE_063/I9 = BYTVAL(SUBSTR(100,STRING,063,063,1,'A1'),'I3') ;
 BYTE_064/I9 = BYTVAL(SUBSTR(100,STRING,064,064,1,'A1'),'I3') ;
 BYTE_065/I9 = BYTVAL(SUBSTR(100,STRING,065,065,1,'A1'),'I3') ;
 BYTE_066/I9 = BYTVAL(SUBSTR(100,STRING,066,066,1,'A1'),'I3') ;
 BYTE_067/I9 = BYTVAL(SUBSTR(100,STRING,067,067,1,'A1'),'I3') ;
 BYTE_068/I9 = BYTVAL(SUBSTR(100,STRING,068,068,1,'A1'),'I3') ;
 BYTE_069/I9 = BYTVAL(SUBSTR(100,STRING,069,069,1,'A1'),'I3') ;
 BYTE_070/I9 = BYTVAL(SUBSTR(100,STRING,070,070,1,'A1'),'I3') ;
 BYTE_071/I9 = BYTVAL(SUBSTR(100,STRING,071,071,1,'A1'),'I3') ;
 BYTE_072/I9 = BYTVAL(SUBSTR(100,STRING,072,072,1,'A1'),'I3') ;
 BYTE_073/I9 = BYTVAL(SUBSTR(100,STRING,073,073,1,'A1'),'I3') ;
 BYTE_074/I9 = BYTVAL(SUBSTR(100,STRING,074,074,1,'A1'),'I3') ;
 BYTE_075/I9 = BYTVAL(SUBSTR(100,STRING,075,075,1,'A1'),'I3') ;
 BYTE_076/I9 = BYTVAL(SUBSTR(100,STRING,076,076,1,'A1'),'I3') ;
 BYTE_077/I9 = BYTVAL(SUBSTR(100,STRING,077,077,1,'A1'),'I3') ;
 BYTE_078/I9 = BYTVAL(SUBSTR(100,STRING,078,078,1,'A1'),'I3') ;
 BYTE_079/I9 = BYTVAL(SUBSTR(100,STRING,079,079,1,'A1'),'I3') ;
 BYTE_080/I9 = BYTVAL(SUBSTR(100,STRING,080,080,1,'A1'),'I3') ;
 BYTE_081/I9 = BYTVAL(SUBSTR(100,STRING,081,081,1,'A1'),'I3') ;
 BYTE_082/I9 = BYTVAL(SUBSTR(100,STRING,082,082,1,'A1'),'I3') ;
 BYTE_083/I9 = BYTVAL(SUBSTR(100,STRING,083,083,1,'A1'),'I3') ;
 BYTE_084/I9 = BYTVAL(SUBSTR(100,STRING,084,084,1,'A1'),'I3') ;
 BYTE_085/I9 = BYTVAL(SUBSTR(100,STRING,085,085,1,'A1'),'I3') ;
 BYTE_086/I9 = BYTVAL(SUBSTR(100,STRING,086,086,1,'A1'),'I3') ;
 BYTE_087/I9 = BYTVAL(SUBSTR(100,STRING,087,087,1,'A1'),'I3') ;
 BYTE_088/I9 = BYTVAL(SUBSTR(100,STRING,088,088,1,'A1'),'I3') ;
 BYTE_089/I9 = BYTVAL(SUBSTR(100,STRING,089,089,1,'A1'),'I3') ;
 BYTE_090/I9 = BYTVAL(SUBSTR(100,STRING,090,090,1,'A1'),'I3') ;
 BYTE_091/I9 = BYTVAL(SUBSTR(100,STRING,091,091,1,'A1'),'I3') ;
 BYTE_092/I9 = BYTVAL(SUBSTR(100,STRING,092,092,1,'A1'),'I3') ;
 BYTE_093/I9 = BYTVAL(SUBSTR(100,STRING,093,093,1,'A1'),'I3') ;
 BYTE_094/I9 = BYTVAL(SUBSTR(100,STRING,094,094,1,'A1'),'I3') ;
 BYTE_095/I9 = BYTVAL(SUBSTR(100,STRING,095,095,1,'A1'),'I3') ;
 BYTE_096/I9 = BYTVAL(SUBSTR(100,STRING,096,096,1,'A1'),'I3') ;
 BYTE_097/I9 = BYTVAL(SUBSTR(100,STRING,097,097,1,'A1'),'I3') ;
 BYTE_098/I9 = BYTVAL(SUBSTR(100,STRING,098,098,1,'A1'),'I3') ;
 BYTE_099/I9 = BYTVAL(SUBSTR(100,STRING,099,099,1,'A1'),'I3') ;
 BYTE_100/I9 = BYTVAL(SUBSTR(100,STRING,100,100,1,'A1'),'I3') ;

 SIZE_000/I9 = 0 ;
 SIZE_001/I9 = IF STR_LEN GE 001 THEN SIZE_000 + DECODE BYTE_001(FNT_MTRC ELSE 0) ELSE SIZE_000 ;
 SIZE_002/I9 = IF STR_LEN GE 002 THEN SIZE_001 + DECODE BYTE_002(FNT_MTRC ELSE 0) ELSE SIZE_001 ;
 SIZE_003/I9 = IF STR_LEN GE 003 THEN SIZE_002 + DECODE BYTE_003(FNT_MTRC ELSE 0) ELSE SIZE_002 ;
 SIZE_004/I9 = IF STR_LEN GE 004 THEN SIZE_003 + DECODE BYTE_004(FNT_MTRC ELSE 0) ELSE SIZE_003 ;
 SIZE_005/I9 = IF STR_LEN GE 005 THEN SIZE_004 + DECODE BYTE_005(FNT_MTRC ELSE 0) ELSE SIZE_004 ;
 SIZE_006/I9 = IF STR_LEN GE 006 THEN SIZE_005 + DECODE BYTE_006(FNT_MTRC ELSE 0) ELSE SIZE_005 ;
 SIZE_007/I9 = IF STR_LEN GE 007 THEN SIZE_006 + DECODE BYTE_007(FNT_MTRC ELSE 0) ELSE SIZE_006 ;
 SIZE_008/I9 = IF STR_LEN GE 008 THEN SIZE_007 + DECODE BYTE_008(FNT_MTRC ELSE 0) ELSE SIZE_007 ;
 SIZE_009/I9 = IF STR_LEN GE 009 THEN SIZE_008 + DECODE BYTE_009(FNT_MTRC ELSE 0) ELSE SIZE_008 ;
 SIZE_010/I9 = IF STR_LEN GE 010 THEN SIZE_009 + DECODE BYTE_010(FNT_MTRC ELSE 0) ELSE SIZE_009 ;
 SIZE_011/I9 = IF STR_LEN GE 011 THEN SIZE_010 + DECODE BYTE_011(FNT_MTRC ELSE 0) ELSE SIZE_010 ;
 SIZE_012/I9 = IF STR_LEN GE 012 THEN SIZE_011 + DECODE BYTE_012(FNT_MTRC ELSE 0) ELSE SIZE_011 ;
 SIZE_013/I9 = IF STR_LEN GE 013 THEN SIZE_012 + DECODE BYTE_013(FNT_MTRC ELSE 0) ELSE SIZE_012 ;
 SIZE_014/I9 = IF STR_LEN GE 014 THEN SIZE_013 + DECODE BYTE_014(FNT_MTRC ELSE 0) ELSE SIZE_013 ;
 SIZE_015/I9 = IF STR_LEN GE 015 THEN SIZE_014 + DECODE BYTE_015(FNT_MTRC ELSE 0) ELSE SIZE_014 ;
 SIZE_016/I9 = IF STR_LEN GE 016 THEN SIZE_015 + DECODE BYTE_016(FNT_MTRC ELSE 0) ELSE SIZE_015 ;
 SIZE_017/I9 = IF STR_LEN GE 017 THEN SIZE_016 + DECODE BYTE_017(FNT_MTRC ELSE 0) ELSE SIZE_016 ;
 SIZE_018/I9 = IF STR_LEN GE 018 THEN SIZE_017 + DECODE BYTE_018(FNT_MTRC ELSE 0) ELSE SIZE_017 ;
 SIZE_019/I9 = IF STR_LEN GE 019 THEN SIZE_018 + DECODE BYTE_019(FNT_MTRC ELSE 0) ELSE SIZE_018 ;
 SIZE_020/I9 = IF STR_LEN GE 020 THEN SIZE_019 + DECODE BYTE_020(FNT_MTRC ELSE 0) ELSE SIZE_019 ;
 SIZE_021/I9 = IF STR_LEN GE 021 THEN SIZE_020 + DECODE BYTE_021(FNT_MTRC ELSE 0) ELSE SIZE_020 ;
 SIZE_022/I9 = IF STR_LEN GE 022 THEN SIZE_021 + DECODE BYTE_022(FNT_MTRC ELSE 0) ELSE SIZE_021 ;
 SIZE_023/I9 = IF STR_LEN GE 023 THEN SIZE_022 + DECODE BYTE_023(FNT_MTRC ELSE 0) ELSE SIZE_022 ;
 SIZE_024/I9 = IF STR_LEN GE 024 THEN SIZE_023 + DECODE BYTE_024(FNT_MTRC ELSE 0) ELSE SIZE_023 ;
 SIZE_025/I9 = IF STR_LEN GE 025 THEN SIZE_024 + DECODE BYTE_025(FNT_MTRC ELSE 0) ELSE SIZE_024 ;
 SIZE_026/I9 = IF STR_LEN GE 026 THEN SIZE_025 + DECODE BYTE_026(FNT_MTRC ELSE 0) ELSE SIZE_025 ;
 SIZE_027/I9 = IF STR_LEN GE 027 THEN SIZE_026 + DECODE BYTE_027(FNT_MTRC ELSE 0) ELSE SIZE_026 ;
 SIZE_028/I9 = IF STR_LEN GE 028 THEN SIZE_027 + DECODE BYTE_028(FNT_MTRC ELSE 0) ELSE SIZE_027 ;
 SIZE_029/I9 = IF STR_LEN GE 029 THEN SIZE_028 + DECODE BYTE_029(FNT_MTRC ELSE 0) ELSE SIZE_028 ;
 SIZE_030/I9 = IF STR_LEN GE 030 THEN SIZE_029 + DECODE BYTE_030(FNT_MTRC ELSE 0) ELSE SIZE_029 ;
 SIZE_031/I9 = IF STR_LEN GE 031 THEN SIZE_030 + DECODE BYTE_031(FNT_MTRC ELSE 0) ELSE SIZE_030 ;
 SIZE_032/I9 = IF STR_LEN GE 032 THEN SIZE_031 + DECODE BYTE_032(FNT_MTRC ELSE 0) ELSE SIZE_031 ;
 SIZE_033/I9 = IF STR_LEN GE 033 THEN SIZE_032 + DECODE BYTE_033(FNT_MTRC ELSE 0) ELSE SIZE_032 ;
 SIZE_034/I9 = IF STR_LEN GE 034 THEN SIZE_033 + DECODE BYTE_034(FNT_MTRC ELSE 0) ELSE SIZE_033 ;
 SIZE_035/I9 = IF STR_LEN GE 035 THEN SIZE_034 + DECODE BYTE_035(FNT_MTRC ELSE 0) ELSE SIZE_034 ;
 SIZE_036/I9 = IF STR_LEN GE 036 THEN SIZE_035 + DECODE BYTE_036(FNT_MTRC ELSE 0) ELSE SIZE_035 ;
 SIZE_037/I9 = IF STR_LEN GE 037 THEN SIZE_036 + DECODE BYTE_037(FNT_MTRC ELSE 0) ELSE SIZE_036 ;
 SIZE_038/I9 = IF STR_LEN GE 038 THEN SIZE_037 + DECODE BYTE_038(FNT_MTRC ELSE 0) ELSE SIZE_037 ;
 SIZE_039/I9 = IF STR_LEN GE 039 THEN SIZE_038 + DECODE BYTE_039(FNT_MTRC ELSE 0) ELSE SIZE_038 ;
 SIZE_040/I9 = IF STR_LEN GE 040 THEN SIZE_039 + DECODE BYTE_040(FNT_MTRC ELSE 0) ELSE SIZE_039 ;
 SIZE_041/I9 = IF STR_LEN GE 041 THEN SIZE_040 + DECODE BYTE_041(FNT_MTRC ELSE 0) ELSE SIZE_040 ;
 SIZE_042/I9 = IF STR_LEN GE 042 THEN SIZE_041 + DECODE BYTE_042(FNT_MTRC ELSE 0) ELSE SIZE_041 ;
 SIZE_043/I9 = IF STR_LEN GE 043 THEN SIZE_042 + DECODE BYTE_043(FNT_MTRC ELSE 0) ELSE SIZE_042 ;
 SIZE_044/I9 = IF STR_LEN GE 044 THEN SIZE_043 + DECODE BYTE_044(FNT_MTRC ELSE 0) ELSE SIZE_043 ;
 SIZE_045/I9 = IF STR_LEN GE 045 THEN SIZE_044 + DECODE BYTE_045(FNT_MTRC ELSE 0) ELSE SIZE_044 ;
 SIZE_046/I9 = IF STR_LEN GE 046 THEN SIZE_045 + DECODE BYTE_046(FNT_MTRC ELSE 0) ELSE SIZE_045 ;
 SIZE_047/I9 = IF STR_LEN GE 047 THEN SIZE_046 + DECODE BYTE_047(FNT_MTRC ELSE 0) ELSE SIZE_046 ;
 SIZE_048/I9 = IF STR_LEN GE 048 THEN SIZE_047 + DECODE BYTE_048(FNT_MTRC ELSE 0) ELSE SIZE_047 ;
 SIZE_049/I9 = IF STR_LEN GE 049 THEN SIZE_048 + DECODE BYTE_049(FNT_MTRC ELSE 0) ELSE SIZE_048 ;
 SIZE_050/I9 = IF STR_LEN GE 050 THEN SIZE_049 + DECODE BYTE_050(FNT_MTRC ELSE 0) ELSE SIZE_049 ;
 SIZE_051/I9 = IF STR_LEN GE 051 THEN SIZE_050 + DECODE BYTE_051(FNT_MTRC ELSE 0) ELSE SIZE_050 ;
 SIZE_052/I9 = IF STR_LEN GE 052 THEN SIZE_051 + DECODE BYTE_052(FNT_MTRC ELSE 0) ELSE SIZE_051 ;
 SIZE_053/I9 = IF STR_LEN GE 053 THEN SIZE_052 + DECODE BYTE_053(FNT_MTRC ELSE 0) ELSE SIZE_052 ;
 SIZE_054/I9 = IF STR_LEN GE 054 THEN SIZE_053 + DECODE BYTE_054(FNT_MTRC ELSE 0) ELSE SIZE_053 ;
 SIZE_055/I9 = IF STR_LEN GE 055 THEN SIZE_054 + DECODE BYTE_055(FNT_MTRC ELSE 0) ELSE SIZE_054 ;
 SIZE_056/I9 = IF STR_LEN GE 056 THEN SIZE_055 + DECODE BYTE_056(FNT_MTRC ELSE 0) ELSE SIZE_055 ;
 SIZE_057/I9 = IF STR_LEN GE 057 THEN SIZE_056 + DECODE BYTE_057(FNT_MTRC ELSE 0) ELSE SIZE_056 ;
 SIZE_058/I9 = IF STR_LEN GE 058 THEN SIZE_057 + DECODE BYTE_058(FNT_MTRC ELSE 0) ELSE SIZE_057 ;
 SIZE_059/I9 = IF STR_LEN GE 059 THEN SIZE_058 + DECODE BYTE_059(FNT_MTRC ELSE 0) ELSE SIZE_058 ;
 SIZE_060/I9 = IF STR_LEN GE 060 THEN SIZE_059 + DECODE BYTE_060(FNT_MTRC ELSE 0) ELSE SIZE_059 ;
 SIZE_061/I9 = IF STR_LEN GE 061 THEN SIZE_060 + DECODE BYTE_061(FNT_MTRC ELSE 0) ELSE SIZE_060 ;
 SIZE_062/I9 = IF STR_LEN GE 062 THEN SIZE_061 + DECODE BYTE_062(FNT_MTRC ELSE 0) ELSE SIZE_061 ;
 SIZE_063/I9 = IF STR_LEN GE 063 THEN SIZE_062 + DECODE BYTE_063(FNT_MTRC ELSE 0) ELSE SIZE_062 ;
 SIZE_064/I9 = IF STR_LEN GE 064 THEN SIZE_063 + DECODE BYTE_064(FNT_MTRC ELSE 0) ELSE SIZE_063 ;
 SIZE_065/I9 = IF STR_LEN GE 065 THEN SIZE_064 + DECODE BYTE_065(FNT_MTRC ELSE 0) ELSE SIZE_064 ;
 SIZE_066/I9 = IF STR_LEN GE 066 THEN SIZE_065 + DECODE BYTE_066(FNT_MTRC ELSE 0) ELSE SIZE_065 ;
 SIZE_067/I9 = IF STR_LEN GE 067 THEN SIZE_066 + DECODE BYTE_067(FNT_MTRC ELSE 0) ELSE SIZE_066 ;
 SIZE_068/I9 = IF STR_LEN GE 068 THEN SIZE_067 + DECODE BYTE_068(FNT_MTRC ELSE 0) ELSE SIZE_067 ;
 SIZE_069/I9 = IF STR_LEN GE 069 THEN SIZE_068 + DECODE BYTE_069(FNT_MTRC ELSE 0) ELSE SIZE_068 ;
 SIZE_070/I9 = IF STR_LEN GE 070 THEN SIZE_069 + DECODE BYTE_070(FNT_MTRC ELSE 0) ELSE SIZE_069 ;
 SIZE_071/I9 = IF STR_LEN GE 071 THEN SIZE_070 + DECODE BYTE_071(FNT_MTRC ELSE 0) ELSE SIZE_070 ;
 SIZE_072/I9 = IF STR_LEN GE 072 THEN SIZE_071 + DECODE BYTE_072(FNT_MTRC ELSE 0) ELSE SIZE_071 ;
 SIZE_073/I9 = IF STR_LEN GE 073 THEN SIZE_072 + DECODE BYTE_073(FNT_MTRC ELSE 0) ELSE SIZE_072 ;
 SIZE_074/I9 = IF STR_LEN GE 074 THEN SIZE_073 + DECODE BYTE_074(FNT_MTRC ELSE 0) ELSE SIZE_073 ;
 SIZE_075/I9 = IF STR_LEN GE 075 THEN SIZE_074 + DECODE BYTE_075(FNT_MTRC ELSE 0) ELSE SIZE_074 ;
 SIZE_076/I9 = IF STR_LEN GE 076 THEN SIZE_075 + DECODE BYTE_076(FNT_MTRC ELSE 0) ELSE SIZE_075 ;
 SIZE_077/I9 = IF STR_LEN GE 077 THEN SIZE_076 + DECODE BYTE_077(FNT_MTRC ELSE 0) ELSE SIZE_076 ;
 SIZE_078/I9 = IF STR_LEN GE 078 THEN SIZE_077 + DECODE BYTE_078(FNT_MTRC ELSE 0) ELSE SIZE_077 ;
 SIZE_079/I9 = IF STR_LEN GE 079 THEN SIZE_078 + DECODE BYTE_079(FNT_MTRC ELSE 0) ELSE SIZE_078 ;
 SIZE_080/I9 = IF STR_LEN GE 080 THEN SIZE_079 + DECODE BYTE_080(FNT_MTRC ELSE 0) ELSE SIZE_079 ;
 SIZE_081/I9 = IF STR_LEN GE 081 THEN SIZE_080 + DECODE BYTE_081(FNT_MTRC ELSE 0) ELSE SIZE_080 ;
 SIZE_082/I9 = IF STR_LEN GE 082 THEN SIZE_081 + DECODE BYTE_082(FNT_MTRC ELSE 0) ELSE SIZE_081 ;
 SIZE_083/I9 = IF STR_LEN GE 083 THEN SIZE_082 + DECODE BYTE_083(FNT_MTRC ELSE 0) ELSE SIZE_082 ;
 SIZE_084/I9 = IF STR_LEN GE 084 THEN SIZE_083 + DECODE BYTE_084(FNT_MTRC ELSE 0) ELSE SIZE_083 ;
 SIZE_085/I9 = IF STR_LEN GE 085 THEN SIZE_084 + DECODE BYTE_085(FNT_MTRC ELSE 0) ELSE SIZE_084 ;
 SIZE_086/I9 = IF STR_LEN GE 086 THEN SIZE_085 + DECODE BYTE_086(FNT_MTRC ELSE 0) ELSE SIZE_085 ;
 SIZE_087/I9 = IF STR_LEN GE 087 THEN SIZE_086 + DECODE BYTE_087(FNT_MTRC ELSE 0) ELSE SIZE_086 ;
 SIZE_088/I9 = IF STR_LEN GE 088 THEN SIZE_087 + DECODE BYTE_088(FNT_MTRC ELSE 0) ELSE SIZE_087 ;
 SIZE_089/I9 = IF STR_LEN GE 089 THEN SIZE_088 + DECODE BYTE_089(FNT_MTRC ELSE 0) ELSE SIZE_088 ;
 SIZE_090/I9 = IF STR_LEN GE 090 THEN SIZE_089 + DECODE BYTE_090(FNT_MTRC ELSE 0) ELSE SIZE_089 ;
 SIZE_091/I9 = IF STR_LEN GE 091 THEN SIZE_090 + DECODE BYTE_091(FNT_MTRC ELSE 0) ELSE SIZE_090 ;
 SIZE_092/I9 = IF STR_LEN GE 092 THEN SIZE_091 + DECODE BYTE_092(FNT_MTRC ELSE 0) ELSE SIZE_091 ;
 SIZE_093/I9 = IF STR_LEN GE 093 THEN SIZE_092 + DECODE BYTE_093(FNT_MTRC ELSE 0) ELSE SIZE_092 ;
 SIZE_094/I9 = IF STR_LEN GE 094 THEN SIZE_093 + DECODE BYTE_094(FNT_MTRC ELSE 0) ELSE SIZE_093 ;
 SIZE_095/I9 = IF STR_LEN GE 095 THEN SIZE_094 + DECODE BYTE_095(FNT_MTRC ELSE 0) ELSE SIZE_094 ;
 SIZE_096/I9 = IF STR_LEN GE 096 THEN SIZE_095 + DECODE BYTE_096(FNT_MTRC ELSE 0) ELSE SIZE_095 ;
 SIZE_097/I9 = IF STR_LEN GE 097 THEN SIZE_096 + DECODE BYTE_097(FNT_MTRC ELSE 0) ELSE SIZE_096 ;
 SIZE_098/I9 = IF STR_LEN GE 098 THEN SIZE_097 + DECODE BYTE_098(FNT_MTRC ELSE 0) ELSE SIZE_097 ;
 SIZE_099/I9 = IF STR_LEN GE 099 THEN SIZE_098 + DECODE BYTE_099(FNT_MTRC ELSE 0) ELSE SIZE_098 ;
 SIZE_100/I9 = IF STR_LEN GE 100 THEN SIZE_099 + DECODE BYTE_100(FNT_MTRC ELSE 0) ELSE SIZE_099 ;

-* 2.83464566929 points per millimeter

 SIZE_IN_PT/P20.8 = SIZE_100 * POINT_SIZE / 1000 ;
 SIZE_IN_MM/P20.8 = SIZE_IN_PT / 2.83464566929 ;

 SPACE_CHAR/I9 = 32 ;
 CONT_CHAR /I9 = BYTVAL(CONTCHAR,'I3') ;
 TEST_SPACE/P20.8 = (((SPACE * 10 * 2.83464566929) * 1000) / POINT_SIZE) - DECODE SPACE_CHAR(FNT_MTRC ELSE 0) ;
 TEST_CONT /P20.8 = (((SPACE * 10 * 2.83464566929) * 1000) / POINT_SIZE) - DECODE SPACE_CHAR(FNT_MTRC ELSE 0) - (DECODE CONT_CHAR(FNT_MTRC ELSE 0) * CONTCOUNT) ;

 TRIM_LEN/I9   = IF SIZE_100 LE TEST_SPACE THEN 100 ELSE
                 IF SIZE_001 GE TEST_CONT THEN 000 ELSE
                 IF SIZE_002 GE TEST_CONT THEN 001 ELSE
                 IF SIZE_003 GE TEST_CONT THEN 002 ELSE
                 IF SIZE_004 GE TEST_CONT THEN 003 ELSE
                 IF SIZE_005 GE TEST_CONT THEN 004 ELSE
                 IF SIZE_006 GE TEST_CONT THEN 005 ELSE
                 IF SIZE_007 GE TEST_CONT THEN 006 ELSE
                 IF SIZE_008 GE TEST_CONT THEN 007 ELSE
                 IF SIZE_009 GE TEST_CONT THEN 008 ELSE
                 IF SIZE_010 GE TEST_CONT THEN 009 ELSE
                 IF SIZE_011 GE TEST_CONT THEN 010 ELSE
                 IF SIZE_012 GE TEST_CONT THEN 011 ELSE
                 IF SIZE_013 GE TEST_CONT THEN 012 ELSE
                 IF SIZE_014 GE TEST_CONT THEN 013 ELSE
                 IF SIZE_015 GE TEST_CONT THEN 014 ELSE
                 IF SIZE_016 GE TEST_CONT THEN 015 ELSE
                 IF SIZE_017 GE TEST_CONT THEN 016 ELSE
                 IF SIZE_018 GE TEST_CONT THEN 017 ELSE
                 IF SIZE_019 GE TEST_CONT THEN 018 ELSE
                 IF SIZE_020 GE TEST_CONT THEN 019 ELSE
                 IF SIZE_021 GE TEST_CONT THEN 020 ELSE
                 IF SIZE_022 GE TEST_CONT THEN 021 ELSE
                 IF SIZE_023 GE TEST_CONT THEN 022 ELSE
                 IF SIZE_024 GE TEST_CONT THEN 023 ELSE
                 IF SIZE_025 GE TEST_CONT THEN 024 ELSE
                 IF SIZE_026 GE TEST_CONT THEN 025 ELSE
                 IF SIZE_027 GE TEST_CONT THEN 026 ELSE
                 IF SIZE_028 GE TEST_CONT THEN 027 ELSE
                 IF SIZE_029 GE TEST_CONT THEN 028 ELSE
                 IF SIZE_030 GE TEST_CONT THEN 029 ELSE
                 IF SIZE_031 GE TEST_CONT THEN 030 ELSE
                 IF SIZE_032 GE TEST_CONT THEN 031 ELSE
                 IF SIZE_033 GE TEST_CONT THEN 032 ELSE
                 IF SIZE_034 GE TEST_CONT THEN 033 ELSE
                 IF SIZE_035 GE TEST_CONT THEN 034 ELSE
                 IF SIZE_036 GE TEST_CONT THEN 035 ELSE
                 IF SIZE_037 GE TEST_CONT THEN 036 ELSE
                 IF SIZE_038 GE TEST_CONT THEN 037 ELSE
                 IF SIZE_039 GE TEST_CONT THEN 038 ELSE
                 IF SIZE_040 GE TEST_CONT THEN 039 ELSE
                 IF SIZE_041 GE TEST_CONT THEN 040 ELSE
                 IF SIZE_042 GE TEST_CONT THEN 041 ELSE
                 IF SIZE_043 GE TEST_CONT THEN 042 ELSE
                 IF SIZE_044 GE TEST_CONT THEN 043 ELSE
                 IF SIZE_045 GE TEST_CONT THEN 044 ELSE
                 IF SIZE_046 GE TEST_CONT THEN 045 ELSE
                 IF SIZE_047 GE TEST_CONT THEN 046 ELSE
                 IF SIZE_048 GE TEST_CONT THEN 047 ELSE
                 IF SIZE_049 GE TEST_CONT THEN 048 ELSE
                 IF SIZE_050 GE TEST_CONT THEN 049 ELSE
                 IF SIZE_051 GE TEST_CONT THEN 050 ELSE
                 IF SIZE_052 GE TEST_CONT THEN 051 ELSE
                 IF SIZE_053 GE TEST_CONT THEN 052 ELSE
                 IF SIZE_054 GE TEST_CONT THEN 053 ELSE
                 IF SIZE_055 GE TEST_CONT THEN 054 ELSE
                 IF SIZE_056 GE TEST_CONT THEN 055 ELSE
                 IF SIZE_057 GE TEST_CONT THEN 056 ELSE
                 IF SIZE_058 GE TEST_CONT THEN 057 ELSE
                 IF SIZE_059 GE TEST_CONT THEN 058 ELSE
                 IF SIZE_060 GE TEST_CONT THEN 059 ELSE
                 IF SIZE_061 GE TEST_CONT THEN 060 ELSE
                 IF SIZE_062 GE TEST_CONT THEN 061 ELSE
                 IF SIZE_063 GE TEST_CONT THEN 062 ELSE
                 IF SIZE_064 GE TEST_CONT THEN 063 ELSE
                 IF SIZE_065 GE TEST_CONT THEN 064 ELSE
                 IF SIZE_066 GE TEST_CONT THEN 065 ELSE
                 IF SIZE_067 GE TEST_CONT THEN 066 ELSE
                 IF SIZE_068 GE TEST_CONT THEN 067 ELSE
                 IF SIZE_069 GE TEST_CONT THEN 068 ELSE
                 IF SIZE_070 GE TEST_CONT THEN 069 ELSE
                 IF SIZE_071 GE TEST_CONT THEN 070 ELSE
                 IF SIZE_072 GE TEST_CONT THEN 071 ELSE
                 IF SIZE_073 GE TEST_CONT THEN 072 ELSE
                 IF SIZE_074 GE TEST_CONT THEN 073 ELSE
                 IF SIZE_075 GE TEST_CONT THEN 074 ELSE
                 IF SIZE_076 GE TEST_CONT THEN 075 ELSE
                 IF SIZE_077 GE TEST_CONT THEN 076 ELSE
                 IF SIZE_078 GE TEST_CONT THEN 077 ELSE
                 IF SIZE_079 GE TEST_CONT THEN 078 ELSE
                 IF SIZE_080 GE TEST_CONT THEN 079 ELSE
                 IF SIZE_081 GE TEST_CONT THEN 080 ELSE
                 IF SIZE_082 GE TEST_CONT THEN 081 ELSE
                 IF SIZE_083 GE TEST_CONT THEN 082 ELSE
                 IF SIZE_084 GE TEST_CONT THEN 083 ELSE
                 IF SIZE_085 GE TEST_CONT THEN 084 ELSE
                 IF SIZE_086 GE TEST_CONT THEN 085 ELSE
                 IF SIZE_087 GE TEST_CONT THEN 086 ELSE
                 IF SIZE_088 GE TEST_CONT THEN 087 ELSE
                 IF SIZE_089 GE TEST_CONT THEN 088 ELSE
                 IF SIZE_090 GE TEST_CONT THEN 089 ELSE
                 IF SIZE_091 GE TEST_CONT THEN 090 ELSE
                 IF SIZE_092 GE TEST_CONT THEN 091 ELSE
                 IF SIZE_093 GE TEST_CONT THEN 092 ELSE
                 IF SIZE_094 GE TEST_CONT THEN 093 ELSE
                 IF SIZE_095 GE TEST_CONT THEN 094 ELSE
                 IF SIZE_096 GE TEST_CONT THEN 095 ELSE
                 IF SIZE_097 GE TEST_CONT THEN 096 ELSE
                 IF SIZE_098 GE TEST_CONT THEN 097 ELSE
                 IF SIZE_099 GE TEST_CONT THEN 098 ELSE
                 IF SIZE_100 GE TEST_CONT THEN 099 ELSE 100 ;

 PADDING/A10   = STRREP(10,'          ',1,' ', 1,CONTCHAR,10,PADDING);

 PADD_STR/A110 = IF TRIM_LEN EQ 100 THEN STRING ELSE SUBSTR(100,STRING,001,TRIM_LEN,TRIM_LEN,'A100') || SUBSTR(10,PADDING,1,CONTCOUNT,CONTCOUNT,'A10') ;

 F_ST_TRM/A100 = SUBSTR(110,PADD_STR,1,100,100,F_ST_TRM) ;

END

-RUN

-******************************************************************************

-SET &MaxWidth = '3.80'

DEFINE FILE JOBLIST
 NewDescCont  /A100 = F_ST_TRM(JOBDESC,8,&MaxWidth,'.',3) ;
 NewDescNoCont/A100 = F_ST_TRM(JOBDESC,8,&MaxWidth,' ',0) ;
END
TABLE FILE JOBLIST
HEADING
" "
"<NewDescCont"
" "
"<NewDescNoCont"
" "
"<JOBDESC"
" "
"<JOBDESC"
" "
PRINT 
      JOBDESC         AS 'Description'
      NewDescCont     AS 'Description,With,Continuation,Character'
      NewDescNoCont   AS 'Description,With No,Continuation,Character'

BY    JOBDESC NOPRINT

ON TABLE PCHOLD FORMAT PDF
ON  TABLE SET STYLE *
 FONT=ARIAL, SIZE=8, SQUEEZE=ON, UNITS=CM, $
 TYPE=HEADING, LINE=6, OBJECT=FIELD, ITEM=1, WIDTH=3, $
 TYPE=HEADING, LINE=8, OBJECT=FIELD, ITEM=1, SQUEEZE=3, $

 TYPE=REPORT, NAME='DGN_BOX1', OBJECT=BOX, POSITION=( 0.65 1.50),DIMENSION=(&MaxWidth 0.37), BORDER-COLOR=BLACK, BORDER=MEDIUM, $
 TYPE=REPORT, NAME='DGN_BOX2', OBJECT=BOX, POSITION=( 0.65 2.08),DIMENSION=(&MaxWidth 0.37), BORDER-COLOR=BLACK, BORDER=MEDIUM, $
 TYPE=REPORT, NAME='DGN_BOX3', OBJECT=BOX, POSITION=( 0.65 2.66),DIMENSION=(&MaxWidth 0.37), BORDER-COLOR=BLACK, BORDER=MEDIUM, $
 TYPE=REPORT, NAME='DGN_BOX4', OBJECT=BOX, POSITION=( 0.65 3.24),DIMENSION=(&MaxWidth 0.37), BORDER-COLOR=BLACK, BORDER=MEDIUM, $

ENDSTYLE

END

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


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!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Expert
posted Hide Post
Thanks a ton to Waz for sharing this technique with all, it is now added to our Tips and Techniques section: http://www.informationbuilders...pers/truncateheading

Cheers,

Kerry


Kerry Zhan
Focal Point Moderator
Information Builders, Inc.
 
Posts: 1948 | Location: New York | Registered: November 16, 2004Report This Post
Member
posted Hide Post
I really liked this function, but just underwent an upgrade to 7.7. Unfortunately, this doesn't work seamlessly with 7.7 because font mapping changed with the new release. I was able to get it running again by replacing

  
FILEDEF PDFTMP DISK &Home..&SubDir..&PDFTmp (LRECL 100 RECFM V

-RUN

-* Write out a master to read the BSB_ACC list
EX -LINES 4 EDAPUT MASTER,PDFTMP,CV,FILE
FILENAME=PDFTMP, SUFFIX=FIX,$
SEGNAME=PDFTMP, $
  FIELD=LINE       ,ALIAS=  ,A100 ,A100 ,$

-RUN

DEFINE  FILE PDFTMP
 UCLINE/A100 = UPCASE(100,LINE,'A100') ;
 MetricsStp1/A70 = GETTOK(LINE,100,3,',',70,'A70') ;
 MetricsStp2/A70 = GETTOK(MetricsStp1,70,2,'=',70,'A70') ;
 MetricsFile/A70 = GETTOK(MetricsStp2,70,1,' ',70,'A70') ;
 Code/A110       = '-SET &|MetricsFile = ''&OS_Dlm..etc&OS_Dlm..' || LOCASE(70,MetricsFile,'A70') || '.afm'';' ;
END
TABLE   FILE PDFTMP
 PRINT
        Code

 WHERE  UCLINE CONTAINS 'FONT=&Font,'
 WHERE  UCLINE CONTAINS 'STYLE=&Style,'

 ON     TABLE SAVE AS FEX_FMF

END


with the following:

  
FILEDEF FONTMAP DISK &Home..&SubDir..&PDFTmp (LRECL 100 RECFM V

-RUN

EX -LINES 3 EDAPUT ACCESS,FONTMAP,CV,FILE
 SEGNAME=FONTMAP, LOCATION=[REPLACE WITH XSD LOCATION],
   ELEMFORM=qualified, ATTRFORM=unqualified, $


-* Write out a master to read the BSB_ACC list
EX -LINES 205 EDAPUT MASTER,FONTMAP,CV,FILE
FILENAME=FONTMAP, SUFFIX=XML     ,
 DATASET=&Home..&SubDir..&PDFTmp, $
  SEGMENT=FONTMAP, SEGTYPE=S0, $
    FIELDNAME=FONTMAP, ALIAS=fontmap, USAGE=A1, ACTUAL=A1, ACCESS_PROPERTY=(INTERNAL), $
    FIELDNAME=VERSION, ALIAS=version, USAGE=I4, ACTUAL=A4,
      MISSING=ON,
      REFERENCE=FONTMAP, PROPERTY=ATTRIBUTE,  $
  SEGMENT=WHEN, SEGTYPE=S0, PARENT=FONTMAP, $
    FIELDNAME=WHEN, ALIAS=when, USAGE=A1, ACTUAL=A1,
      MISSING=ON, ACCESS_PROPERTY=(INTERNAL),
      REFERENCE=FONTMAP, PROPERTY=ELEMENT,  $
    FIELDNAME=FORMAT, ALIAS=format, USAGE=A10, ACTUAL=A10,
      MISSING=ON,
      REFERENCE=WHEN.WHEN, PROPERTY=ATTRIBUTE,  $
  SEGMENT=FAMILY, SEGTYPE=S0, PARENT=WHEN, $
    FIELDNAME=FAMILY, ALIAS=family, USAGE=A1, ACTUAL=A1, ACCESS_PROPERTY=(INTERNAL),
      REFERENCE=WHEN.WHEN, PROPERTY=ELEMENT,  $
    FIELDNAME=IF, ALIAS=if, USAGE=A1, ACTUAL=A1,
      MISSING=ON, ACCESS_PROPERTY=(INTERNAL),
      REFERENCE=FAMILY.FAMILY, PROPERTY=ELEMENT,  $
    FIELDNAME=THEN, ALIAS=then, USAGE=A1, ACTUAL=A1, ACCESS_PROPERTY=(INTERNAL),
      REFERENCE=FAMILY.IF, PROPERTY=ELEMENT,  $
    FIELDNAME=ELSE, ALIAS=else, USAGE=A1, ACTUAL=A1, ACCESS_PROPERTY=(INTERNAL),
      REFERENCE=FAMILY.IF, PROPERTY=ELEMENT,  $
    FIELDNAME=LANG, ALIAS=lang, USAGE=A10, ACTUAL=A10,
      MISSING=ON,
      REFERENCE=FAMILY.IF, PROPERTY=ATTRIBUTE,  $
    FIELDNAME=NAME, ALIAS=name, USAGE=A10, ACTUAL=A10,
      MISSING=ON,
      REFERENCE=FAMILY.FAMILY, PROPERTY=ATTRIBUTE,  $
    FIELDNAME=HTMLFONT, ALIAS=htmlfont, USAGE=A10, ACTUAL=A10,
      MISSING=ON,
      REFERENCE=FAMILY.FAMILY, PROPERTY=ATTRIBUTE,  $
  SEGMENT=FONT, SEGTYPE=S0, PARENT=FAMILY, $
    FIELDNAME=FONT, ALIAS=font, USAGE=A10, ACTUAL=A10,
      MISSING=ON,
      REFERENCE=FAMILY.FAMILY, PROPERTY=ELEMENT,  $
    FIELDNAME=STYLE, ALIAS=style, USAGE=A10, ACTUAL=A10,
      MISSING=ON,
      REFERENCE=FONT.FONT, PROPERTY=ATTRIBUTE,  $
    FIELDNAME=METRICSFILE, ALIAS=metricsfile, USAGE=A10, ACTUAL=A10,
      MISSING=ON,
      REFERENCE=FONT.FONT, PROPERTY=ATTRIBUTE,  $
  SEGMENT=FONT1, SEGTYPE=S0, PARENT=FAMILY, $
    FIELDNAME=FONT, ALIAS=font, USAGE=A10, ACTUAL=A10,
      MISSING=ON,
      REFERENCE=FAMILY.THEN, PROPERTY=ELEMENT,  $
    FIELDNAME=STYLE, ALIAS=style, USAGE=A10, ACTUAL=A10,
      MISSING=ON,
      REFERENCE=FONT1.FONT, PROPERTY=ATTRIBUTE,  $
    FIELDNAME=METRICSFILE, ALIAS=metricsfile, USAGE=A10, ACTUAL=A10,
      MISSING=ON,
      REFERENCE=FONT1.FONT, PROPERTY=ATTRIBUTE,  $
  SEGMENT=FONT2, SEGTYPE=S0, PARENT=FAMILY, $
    FIELDNAME=FONT, ALIAS=font, USAGE=A10, ACTUAL=A10,
      MISSING=ON,
      REFERENCE=FAMILY.ELSE, PROPERTY=ELEMENT,  $
    FIELDNAME=STYLE, ALIAS=style, USAGE=A10, ACTUAL=A10,
      MISSING=ON,
      REFERENCE=FONT2.FONT, PROPERTY=ATTRIBUTE,  $
    FIELDNAME=METRICSFILE, ALIAS=metricsfile, USAGE=A10, ACTUAL=A10,
      MISSING=ON,
      REFERENCE=FONT2.FONT, PROPERTY=ATTRIBUTE,  $
  SEGMENT=WHEN1, SEGTYPE=S0, PARENT=WHEN, $
    FIELDNAME=WHEN, ALIAS=when, USAGE=A1, ACTUAL=A1, ACCESS_PROPERTY=(INTERNAL),
      REFERENCE=WHEN.WHEN, PROPERTY=ELEMENT,  $
    FIELDNAME=LANG, ALIAS=lang, USAGE=A10, ACTUAL=A10,
      MISSING=ON,
      REFERENCE=WHEN1.WHEN, PROPERTY=ATTRIBUTE,  $
    FIELDNAME=NAME, ALIAS=name, USAGE=A10, ACTUAL=A10,
      MISSING=ON,
      REFERENCE=WHEN1.WHEN, PROPERTY=ATTRIBUTE,  $
  SEGMENT=FAMILY1, SEGTYPE=S0, PARENT=WHEN1, $
    FIELDNAME=FAMILY, ALIAS=family, USAGE=A1, ACTUAL=A1,
      MISSING=ON, ACCESS_PROPERTY=(INTERNAL),
      REFERENCE=WHEN1.WHEN, PROPERTY=ELEMENT,  $
    FIELDNAME=NAME, ALIAS=name, USAGE=A10, ACTUAL=A10,
      MISSING=ON,
      REFERENCE=FAMILY1.FAMILY, PROPERTY=ATTRIBUTE,  $
  SEGMENT=FONT3, SEGTYPE=S0, PARENT=FAMILY1, $
    FIELDNAME=FONT, ALIAS=font, USAGE=A10, ACTUAL=A10,
      MISSING=ON,
      REFERENCE=FAMILY1.FAMILY, PROPERTY=ELEMENT,  $
    FIELDNAME=STYLE, ALIAS=style, USAGE=A10, ACTUAL=A10,
      MISSING=ON,
      REFERENCE=FONT3.FONT, PROPERTY=ATTRIBUTE,  $
    FIELDNAME=METRICSFILE, ALIAS=metricsfile, USAGE=A10, ACTUAL=A10,
      MISSING=ON,
      REFERENCE=FONT3.FONT, PROPERTY=ATTRIBUTE,  $
    FIELDNAME=DEFAULT, ALIAS=default, USAGE=A10, ACTUAL=A10,
      MISSING=ON,
      REFERENCE=FONT3.FONT, PROPERTY=ATTRIBUTE,  $
  SEGMENT=FONT4, SEGTYPE=S0, PARENT=WHEN1, $
    FIELDNAME=FONT, ALIAS=font, USAGE=A10, ACTUAL=A10,
      MISSING=ON,
      REFERENCE=WHEN1.WHEN, PROPERTY=ELEMENT,  $
    FIELDNAME=STYLE, ALIAS=style, USAGE=A10, ACTUAL=A10,
      MISSING=ON,
      REFERENCE=FONT4.FONT, PROPERTY=ATTRIBUTE,  $
    FIELDNAME=METRICSFILE, ALIAS=metricsfile, USAGE=A10, ACTUAL=A10,
      MISSING=ON,
      REFERENCE=FONT4.FONT, PROPERTY=ATTRIBUTE,  $
  SEGMENT=IF, SEGTYPE=S0, PARENT=WHEN, $
    FIELDNAME=IF, ALIAS=if, USAGE=A1, ACTUAL=A1, ACCESS_PROPERTY=(INTERNAL),
      REFERENCE=WHEN.WHEN, PROPERTY=ELEMENT,  $
    FIELDNAME=THEN, ALIAS=then, USAGE=A1, ACTUAL=A1,
      MISSING=ON, ACCESS_PROPERTY=(INTERNAL),
      REFERENCE=IF.IF, PROPERTY=ELEMENT,  $
    FIELDNAME=ELSE, ALIAS=else, USAGE=A1, ACTUAL=A1,
      MISSING=ON, ACCESS_PROPERTY=(INTERNAL),
      REFERENCE=IF.IF, PROPERTY=ELEMENT,  $
    FIELDNAME=LANG, ALIAS=lang, USAGE=A10, ACTUAL=A10,
      MISSING=ON,
      REFERENCE=IF.IF, PROPERTY=ATTRIBUTE,  $
    FIELDNAME=NAME, ALIAS=name, USAGE=A10, ACTUAL=A10,
      MISSING=ON,
      REFERENCE=IF.IF, PROPERTY=ATTRIBUTE,  $
  SEGMENT=FAMILY2, SEGTYPE=S0, PARENT=IF, $
    FIELDNAME=FAMILY, ALIAS=family, USAGE=A1, ACTUAL=A1,
      MISSING=ON, ACCESS_PROPERTY=(INTERNAL),
      REFERENCE=IF.THEN, PROPERTY=ELEMENT,  $
    FIELDNAME=NAME, ALIAS=name, USAGE=A10, ACTUAL=A10,
      MISSING=ON,
      REFERENCE=FAMILY2.FAMILY, PROPERTY=ATTRIBUTE,  $
  SEGMENT=FONT5, SEGTYPE=S0, PARENT=FAMILY2, $
    FIELDNAME=FONT, ALIAS=font, USAGE=A10, ACTUAL=A10,
      MISSING=ON,
      REFERENCE=FAMILY2.FAMILY, PROPERTY=ELEMENT,  $
    FIELDNAME=STYLE, ALIAS=style, USAGE=A10, ACTUAL=A10,
      MISSING=ON,
      REFERENCE=FONT5.FONT, PROPERTY=ATTRIBUTE,  $
    FIELDNAME=METRICSFILE, ALIAS=metricsfile, USAGE=A10, ACTUAL=A10,
      MISSING=ON,
      REFERENCE=FONT5.FONT, PROPERTY=ATTRIBUTE,  $
  SEGMENT=FAMILY3, SEGTYPE=S0, PARENT=IF, $
    FIELDNAME=FAMILY, ALIAS=family, USAGE=A1, ACTUAL=A1,
      MISSING=ON, ACCESS_PROPERTY=(INTERNAL),
      REFERENCE=IF.ELSE, PROPERTY=ELEMENT,  $
    FIELDNAME=NAME, ALIAS=name, USAGE=A10, ACTUAL=A10,
      MISSING=ON,
      REFERENCE=FAMILY3.FAMILY, PROPERTY=ATTRIBUTE,  $
  SEGMENT=FONT6, SEGTYPE=S0, PARENT=FAMILY3, $
    FIELDNAME=FONT, ALIAS=font, USAGE=A10, ACTUAL=A10,
      MISSING=ON,
      REFERENCE=FAMILY3.FAMILY, PROPERTY=ELEMENT,  $
    FIELDNAME=STYLE, ALIAS=style, USAGE=A10, ACTUAL=A10,
      MISSING=ON,
      REFERENCE=FONT6.FONT, PROPERTY=ATTRIBUTE,  $
    FIELDNAME=METRICSFILE, ALIAS=metricsfile, USAGE=A10, ACTUAL=A10,
      MISSING=ON,
      REFERENCE=FONT6.FONT, PROPERTY=ATTRIBUTE,  $
  SEGMENT=FONT7, SEGTYPE=S0, PARENT=IF, $
    FIELDNAME=FONT, ALIAS=font, USAGE=A10, ACTUAL=A10,
      MISSING=ON,
      REFERENCE=IF.IF, PROPERTY=ELEMENT,  $
    FIELDNAME=STYLE, ALIAS=style, USAGE=A10, ACTUAL=A10,
      MISSING=ON,
      REFERENCE=FONT7.FONT, PROPERTY=ATTRIBUTE,  $
    FIELDNAME=METRICSFILE, ALIAS=metricsfile, USAGE=A10, ACTUAL=A10,
      MISSING=ON,
      REFERENCE=FONT7.FONT, PROPERTY=ATTRIBUTE,  $
  SEGMENT=FONT8, SEGTYPE=S0, PARENT=WHEN, $
    FIELDNAME=FONT, ALIAS=font, USAGE=A10, ACTUAL=A10,
      REFERENCE=WHEN.WHEN, PROPERTY=ELEMENT,  $
    FIELDNAME=FAMILY, ALIAS=family, USAGE=A1, ACTUAL=A1,
      MISSING=ON, ACCESS_PROPERTY=(INTERNAL),
      REFERENCE=FONT8.FONT, PROPERTY=ELEMENT,  $
    FIELDNAME=NAME, ALIAS=name, USAGE=A10, ACTUAL=A10,
      MISSING=ON,
      REFERENCE=FONT8.FAMILY, PROPERTY=ATTRIBUTE,  $
    FIELDNAME=NAME1, ALIAS=name, USAGE=A10, ACTUAL=A10,
      MISSING=ON,
      REFERENCE=FONT8.FONT, PROPERTY=ATTRIBUTE,  $
    FIELDNAME=STYLE, ALIAS=style, USAGE=A10, ACTUAL=A10,
      MISSING=ON,
      REFERENCE=FONT8.FONT, PROPERTY=ATTRIBUTE,  $
    FIELDNAME=METRICSFILE, ALIAS=metricsfile, USAGE=A10, ACTUAL=A10,
      MISSING=ON,
      REFERENCE=FONT8.FONT, PROPERTY=ATTRIBUTE,  $
    FIELDNAME=FONTFILE, ALIAS=fontfile, USAGE=A10, ACTUAL=A10,
      MISSING=ON,
      REFERENCE=FONT8.FONT, PROPERTY=ATTRIBUTE,  $
    FIELDNAME=FONTTYPE, ALIAS=fonttype, USAGE=A10, ACTUAL=A10,
      MISSING=ON,
      REFERENCE=FONT8.FONT, PROPERTY=ATTRIBUTE,  $
    FIELDNAME=LANG, ALIAS=lang, USAGE=A10, ACTUAL=A10,
      MISSING=ON,
      REFERENCE=FONT8.FONT, PROPERTY=ATTRIBUTE,  $
  SEGMENT=FONT9, SEGTYPE=S0, PARENT=FONT8, $
    FIELDNAME=FONT, ALIAS=font, USAGE=A10, ACTUAL=A10,
      MISSING=ON,
      REFERENCE=FONT8.FAMILY, PROPERTY=ELEMENT,  $
    FIELDNAME=STYLE, ALIAS=style, USAGE=A10, ACTUAL=A10,
      MISSING=ON,
      REFERENCE=FONT9.FONT, PROPERTY=ATTRIBUTE,  $
    FIELDNAME=METRICSFILE, ALIAS=metricsfile, USAGE=A10, ACTUAL=A10,
      MISSING=ON,
      REFERENCE=FONT9.FONT, PROPERTY=ATTRIBUTE,  $
    FIELDNAME=FONTFILE, ALIAS=fontfile, USAGE=A10, ACTUAL=A10,
      MISSING=ON,
      REFERENCE=FONT9.FONT, PROPERTY=ATTRIBUTE,  $
    FIELDNAME=FONTTYPE, ALIAS=fonttype, USAGE=A10, ACTUAL=A10,
      MISSING=ON,
      REFERENCE=FONT9.FONT, PROPERTY=ATTRIBUTE,  $


-RUN


DEFINE  FILE FONTMAP
 Code/A110       = '-SET &|MetricsFile = ''&OS_Dlm..etc&OS_Dlm..' || LOCASE(70,FONTMAP.FONT.METRICSFILE,'A70') || '.afm'';' ;
END

TABLE   FILE FONTMAP
 PRINT
        Code

	WHERE FONTMAP.WHEN.FORMAT EQ 'pdf';

 ON     TABLE SAVE AS FEX_FMF

END


The gist of this is that in 7.7, the fontmap was converted to an XML file (fontmap.xml). We can still read the file and get the metrics files from it, it just takes a little more work. In addition to the code above, you need to generate an XSD file from fontmap.xml, place it somewhere that the server can find it, and in the above, replace [REPLACE WITH XSD LOCATION] with the path your server needs to use to load the XSD.

DISCLAIMER:
Consider this a starting point. The above code does not account for fonts the user added to the report, nor does it account for some of the language contingent font mappings. It was enough to get me up and running, but if you have language contingencies or user added fonts, you'll have additional work to do.

Hope this helps someone out there!


Version 7.6.10
Windows 7 Pro
all output
 
Posts: 18 | Registered: May 20, 2010Report This Post
Member
posted Hide Post
I wanted to include the XSD file:
  
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="fontmap">
    <xs:annotation>
      <xs:documentation>FONTMAP.XML: IBI standard font mappings  Users should not modify this file.  Please see fontsamp.xml (in the
      same directory) for instructions on how to add your own fonts.</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element name="when" maxOccurs="unbounded" minOccurs="0">
          <xs:annotation>
            <xs:documentation>- -  DHTML format  - -  - -  PDF format  - -  - -  POSTSCRIPT format  - -</xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:choice maxOccurs="unbounded" minOccurs="0">
              <xs:element name="family">
                <xs:annotation>
                  <xs:documentation>Japanese Fonts:  Hebrew Font:  Korean Fonts:  Traditional Chinese:  Simplified Chinese:  Built-in PDF fonts:  Aliases from standard Windows fonts:  Aliases for PostScript fonts:  Aliases for Windows fonts:  Aliases for Japanese Windows fonts:</xs:documentation>
                </xs:annotation>
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="font" maxOccurs="unbounded" minOccurs="0">
                      <xs:complexType>
                        <xs:simpleContent>
                          <xs:extension base="xs:string">
                            <xs:attribute type="xs:string" name="style" use="optional"/>
                            <xs:attribute type="xs:string" name="metricsfile" use="optional"/>
                          </xs:extension>
                        </xs:simpleContent>
                      </xs:complexType>
                    </xs:element>
                    <xs:element name="if" minOccurs="0">
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element name="then">
                            <xs:complexType>
                              <xs:sequence>
                                <xs:element name="font" maxOccurs="unbounded" minOccurs="0">
                                  <xs:complexType>
                                    <xs:simpleContent>
                                      <xs:extension base="xs:string">
                                        <xs:attribute type="xs:string" name="style" use="optional"/>
                                        <xs:attribute type="xs:string" name="metricsfile" use="optional"/>
                                      </xs:extension>
                                    </xs:simpleContent>
                                  </xs:complexType>
                                </xs:element>
                              </xs:sequence>
                            </xs:complexType>
                          </xs:element>
                          <xs:element name="else">
                            <xs:complexType>
                              <xs:sequence>
                                <xs:element name="font" maxOccurs="unbounded" minOccurs="0">
                                  <xs:complexType>
                                    <xs:simpleContent>
                                      <xs:extension base="xs:string">
                                        <xs:attribute type="xs:string" name="style" use="optional"/>
                                        <xs:attribute type="xs:string" name="metricsfile" use="optional"/>
                                      </xs:extension>
                                    </xs:simpleContent>
                                  </xs:complexType>
                                </xs:element>
                              </xs:sequence>
                            </xs:complexType>
                          </xs:element>
                        </xs:sequence>
                        <xs:attribute type="xs:string" name="lang" use="optional"/>
                      </xs:complexType>
                    </xs:element>
                  </xs:sequence>
                  <xs:attribute type="xs:string" name="name" use="optional"/>
                  <xs:attribute type="xs:string" name="htmlfont" use="optional"/>
                </xs:complexType>
              </xs:element>
              <xs:element name="when">
                <xs:annotation>
                  <xs:documentation>Japanese inclusions  Korean inclusions  People's Republic of China inclusions  Republic of China inclusions  Fonts for Unicode feature:  Aliases for Unicode fonts:  Aliases for Japanese Windows fonts as Japanese Charaster:  Aliases for Unicode fonts:</xs:documentation>
                </xs:annotation>
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="family" maxOccurs="unbounded" minOccurs="0">
                      <xs:annotation>
                        <xs:documentation>Japanese Fonts as Japanese Character:  Korean Fonts as Korean character:  Simplified Chinese Windows fonts as Chinese characters:  Taiwanese Windows fonts as Taiwanese character:  Aliases for Korean Windows fonts as Korean character:  Aliases for Simplified Chinese Windows fonts as Chinese chars:  Aliases for Taiwanese Windows fonts as Taiwanese character:</xs:documentation>
                      </xs:annotation>
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element name="font" maxOccurs="unbounded" minOccurs="0">
                            <xs:complexType>
                              <xs:simpleContent>
                                <xs:extension base="xs:string">
                                  <xs:attribute type="xs:string" name="style" use="optional"/>
                                  <xs:attribute type="xs:string" name="metricsfile" use="optional"/>
                                  <xs:attribute type="xs:string" name="default" use="optional"/>
                                </xs:extension>
                              </xs:simpleContent>
                            </xs:complexType>
                          </xs:element>
                        </xs:sequence>
                        <xs:attribute type="xs:string" name="name" use="optional"/>
                      </xs:complexType>
                    </xs:element>
                    <xs:element name="font" maxOccurs="unbounded" minOccurs="0">
                      <xs:complexType>
                        <xs:simpleContent>
                          <xs:extension base="xs:string">
                            <xs:attribute type="xs:string" name="style" use="optional"/>
                            <xs:attribute type="xs:string" name="metricsfile" use="optional"/>
                          </xs:extension>
                        </xs:simpleContent>
                      </xs:complexType>
                    </xs:element>
                  </xs:sequence>
                  <xs:attribute type="xs:string" name="lang" use="optional"/>
                  <xs:attribute type="xs:string" name="name" use="optional"/>
                </xs:complexType>
              </xs:element>
              <xs:element name="if">
                <xs:annotation>
                  <xs:documentation>Aliases for Japanese Windows fonts:  Aliases for Hebrew Windows fonts:</xs:documentation>
                </xs:annotation>
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="then" minOccurs="0">
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element name="family" maxOccurs="unbounded" minOccurs="0">
                            <xs:complexType>
                              <xs:sequence>
                                <xs:element name="font" maxOccurs="unbounded" minOccurs="0">
                                  <xs:complexType>
                                    <xs:simpleContent>
                                      <xs:extension base="xs:string">
                                        <xs:attribute type="xs:string" name="style" use="optional"/>
                                        <xs:attribute type="xs:string" name="metricsfile" use="optional"/>
                                      </xs:extension>
                                    </xs:simpleContent>
                                  </xs:complexType>
                                </xs:element>
                              </xs:sequence>
                              <xs:attribute type="xs:string" name="name" use="optional"/>
                            </xs:complexType>
                          </xs:element>
                        </xs:sequence>
                      </xs:complexType>
                    </xs:element>
                    <xs:element name="else" minOccurs="0">
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element name="family" maxOccurs="unbounded" minOccurs="0">
                            <xs:complexType>
                              <xs:sequence>
                                <xs:element name="font" maxOccurs="unbounded" minOccurs="0">
                                  <xs:complexType>
                                    <xs:simpleContent>
                                      <xs:extension base="xs:string">
                                        <xs:attribute type="xs:string" name="style" use="optional"/>
                                        <xs:attribute type="xs:string" name="metricsfile" use="optional"/>
                                      </xs:extension>
                                    </xs:simpleContent>
                                  </xs:complexType>
                                </xs:element>
                              </xs:sequence>
                              <xs:attribute type="xs:string" name="name" use="optional"/>
                            </xs:complexType>
                          </xs:element>
                        </xs:sequence>
                      </xs:complexType>
                    </xs:element>
                    <xs:element name="font" maxOccurs="unbounded" minOccurs="0">
                      <xs:complexType>
                        <xs:simpleContent>
                          <xs:extension base="xs:string">
                            <xs:attribute type="xs:string" name="style" use="optional"/>
                            <xs:attribute type="xs:string" name="metricsfile" use="optional"/>
                          </xs:extension>
                        </xs:simpleContent>
                      </xs:complexType>
                    </xs:element>
                  </xs:sequence>
                  <xs:attribute type="xs:string" name="lang" use="optional"/>
                  <xs:attribute type="xs:string" name="name" use="optional"/>
                </xs:complexType>
              </xs:element>
              <xs:element name="font">
                <xs:annotation>
                  <xs:documentation>Sample fonts for PDF and PS font embedding:  Sample fonts for PDF and PS font embedding:</xs:documentation>
                </xs:annotation>
                <xs:complexType mixed="true">
                  <xs:sequence>
                    <xs:element name="family" minOccurs="0">
                      <xs:annotation>
                        <xs:documentation>Aliases for Thai type 1 fonts embedding:</xs:documentation>
                      </xs:annotation>
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element name="font" maxOccurs="unbounded" minOccurs="0">
                            <xs:complexType>
                              <xs:simpleContent>
                                <xs:extension base="xs:string">
                                  <xs:attribute type="xs:string" name="style" use="optional"/>
                                  <xs:attribute type="xs:string" name="metricsfile" use="optional"/>
                                  <xs:attribute type="xs:string" name="fontfile" use="optional"/>
                                  <xs:attribute type="xs:string" name="fonttype" use="optional"/>
                                </xs:extension>
                              </xs:simpleContent>
                            </xs:complexType>
                          </xs:element>
                        </xs:sequence>
                        <xs:attribute type="xs:string" name="name"/>
                      </xs:complexType>
                    </xs:element>
                  </xs:sequence>
                  <xs:attribute type="xs:string" name="name" use="optional"/>
                  <xs:attribute type="xs:string" name="style" use="optional"/>
                  <xs:attribute type="xs:string" name="metricsfile" use="optional"/>
                  <xs:attribute type="xs:string" name="fontfile" use="optional"/>
                  <xs:attribute type="xs:string" name="fonttype" use="optional"/>
                  <xs:attribute type="xs:string" name="lang" use="optional"/>
                </xs:complexType>
              </xs:element>
            </xs:choice>
            <xs:attribute type="xs:string" name="format" use="optional"/>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
      <xs:attribute type="xs:byte" name="version"/>
    </xs:complexType>
  </xs:element>
</xs:schema>


Version 7.6.10
Windows 7 Pro
all output
 
Posts: 18 | Registered: May 20, 2010Report This Post
Expert
posted Hide Post
Awesome Byrnsy,

And I didn't have to do anything.....


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!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SHARING] Truncating text in the heading of a PDF document

Copyright © 1996-2020 Information Builders