Focal Point
[SOLVED] Need to trim the <ibi-page-number/> in PDF Layout Painter

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

June 25, 2012, 03:36 AM
Kumaravel
[SOLVED] Need to trim the <ibi-page-number/> in PDF Layout Painter
Hi All,

I required to trim the in PDF Layout Painter page master. I am using following string to display in footer in by each report.
 OBJECT=STRING, NAME='text23', TEXT='<font face="ARIAL" size=8>Page  <ibi-page-number/> of  <ibi-total-pages/></font>', POSITION=(5.550 7.975), MARKUP=ON, WRAP=ON, DIMENSION=(1.416 0.208),  METADATA='', $  


The footer display with some space between current page number and the word "of". I think the "ibi-page-number" return 4 digit number, so when it displays single digit its giving three spaces for other digit number.

Since I required bookmark I went for PDF Layout Painter option.

Please help me to remove the unwanted spaces in the footer. I am using WebFOCUS 7.7.03.

This message has been edited. Last edited by: FP Mod Chuck,
June 25, 2012, 05:09 AM
Ram Prasad E
Hello,
Break your object into 2 objects as below.
OBJECT=STRING, NAME='footer_page_10', TEXT='<font face="ARIAL" size=8 color=#FFFFFF>Page  <ibi-page-number/></font>',
POSITION=(7.595 21.505), MARKUP=ON, WRAP=ON, DIMENSION=(1.500 0.200),  METADATA='',$
OBJECT=STRING, NAME='footer_page_20', TEXT='<font face="ARIAL" size=8 color=#FFFFFF> of  <ibi-total-pages/></font>',
POSITION=(7.995 21.505), MARKUP=ON, WRAP=ON, DIMENSION=(1.500 0.200),  METADATA='',$

Hope this works.

-Ram


WebFOCUS 8.1.05
Windows
http://ibiwebfocus.wordpress.com
https://www.facebook.com/groups/ibi.webfocus/
June 25, 2012, 07:14 AM
Kumaravel
Hi Ram,
Thanks for your reply.
I tried by giving in two objects, but when the current page number is more than single digit it overlaps with the word "of". I tried by changing the position, but again its static, for single digit we are getting space between current page number and "of". When we are having three digit current page number its coming without any space. The below is code I checked by changing the position
 OBJECT=STRING, NAME='footer_page_10', TEXT='<font face="ARIAL" size=8>Page  <ibi-page-number/></font>', POSITION=(5.595 7.905), MARKUP=ON, WRAP=ON, DIMENSION=(1.500 0.200),  METADATA='',$
OBJECT=STRING, NAME='footer_page_20', TEXT='<font face="ARIAL" size=8> of  <ibi-total-pages/></font>', POSITION=(6.095 7.905), MARKUP=ON, WRAP=ON, DIMENSION=(1.500 0.200),  METADATA='',$  


Please find the below example on GGSALES table used in PDF Layout

 SET HTMLARCHIVE=ON
COMPOUND LAYOUT PCHOLD FORMAT PDF
UNITS=IN, $
OBJECT=bookmarks ,$
SECTION=section1, LAYOUT=ON, METADATA='.208^.208^.208^.208^4', MERGE=OFF, ORIENTATION=LANDSCAPE, PAGESIZE=LETTER, SHOW_GLOBALFILTER=OFF, $
PAGELAYOUT=ALL, NAME='Page Master', $
OBJECT=STRING, NAME='footer_page_10', TEXT='<font face="ARIAL" size=8>Page  <ibi-page-number/></font>', POSITION=(5.595 7.905), MARKUP=ON, WRAP=ON, DIMENSION=(1.500 0.200),  METADATA='',$
OBJECT=STRING, NAME='footer_page_20', TEXT='<font face="ARIAL" size=8> of  <ibi-total-pages/></font>', POSITION=(6.095 7.905), MARKUP=ON, WRAP=ON, DIMENSION=(1.500 0.200),  METADATA='',$
COMPONENT='DfltCmpt1', POSITION=(0 0), DIMENSION=(0 0), $
PAGELAYOUT=1, NAME='Page layout 1', text='Page layout 1', TOC-LEVEL=0, BOTTOMMARGIN=0.208, TOPMARGIN=0.208, LEFTMARGIN=0.208, RIGHTMARGIN=0.208, METADATA='BOTTOMMARGIN=0.208,TOPMARGIN=0.208,LEFTMARGIN=0.208,RIGHTMARGIN=0.208,', $
COMPONENT='report 1', TEXT='Report 1', TOC-LEVEL=1, POSITION=(0.208 0.208), DIMENSION=(11.290 7.772), METADATA='Z-INDEX: 100; POSITION: absolute; WIDTH: 11.29in; HEIGHT: 7.772in; TOP: 0.208in; LEFT: 0.208in', $
PAGELAYOUT=2, NAME='Page layout 2', text='Page layout 2', TOC-LEVEL=0, BOTTOMMARGIN=0.208, TOPMARGIN=0.208, LEFTMARGIN=0.208, RIGHTMARGIN=0.208, METADATA='BOTTOMMARGIN=0.208,TOPMARGIN=0.208,LEFTMARGIN=0.208,RIGHTMARGIN=0.208,', $
COMPONENT='report 2', TEXT='Report 2', TOC-LEVEL=1, POSITION=(0.208 0.208), DIMENSION=(11.290 7.772), METADATA='Z-INDEX: 101; POSITION: absolute; WIDTH: 11.29in; HEIGHT: 7.772in; TOP: 0.208in; LEFT: 0.208in', $
END 
 
SET COMPONENT='DfltCmpt1'
TABLE FILE SYSCOLUM
" "
SUM TBNAME NOPRINT
IF READLIMIT EQ 1
ON TABLE SET PREVIEW ON
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
END
 
SET COMPONENT='report 1'
TABLE FILE GGSALES
PRINT
CATEGORY PRODUCT REGION ST
ON TABLE SET PAGE-NUM NOLEAD
END
 
SET COMPONENT='report 2'
TABLE FILE GGSALES
PRINT
CATEGORY PRODUCT
ON TABLE SET PAGE-NUM NOLEAD
END
 
COMPOUND END
 

October 17, 2017, 04:30 AM
Bruno Gubler
I Need also a Solution for this, because I Need in the middle of a longer Text, which can be in different Languages.

So a Simple TRIM of this Number would help.


WebFOCUS 8
Linux, All Outputs
October 17, 2017, 09:19 AM
Francis Mariani
Read my rant about this in WF 8.0.08: [CASE OPENED] Dev Studio 8.0.08 Document Composer - Page n of nn problem

I opened a case about this in December 2015 (23363532), I don't know if it was ever resolved (current status is "General Research Required").

Meanwhile, the workaround (in WF 8.0.08) is to manually edit the GUI-generated code:

In the line of code that contains the page info
OBJECT=STRING, NAME='text1', TEXT='<font face="TREBUCHET MS" size=10>Page <ibi-page-number/> of <ibi-total-pages/></font>', POSITION=(1.979 3.229), MARKUP=ON, WRAP=ON, DIMENSION=(4.375 1.458),
METADATA='Z-INDEX: 1; POSITION: absolute; WIDTH: 4.375in; FONT-FAMILY: Trebuchet MS; WORD-WRAP: break-word; HEIGHT: 1.458in; FONT-SIZE: 10pt; TOP: 3.229in; LEFT: 1.979in', $

Replace
MARKUP=ON, WRAP=ON
with
MARKUP=ON, WRAP=OFF

Unfortunately, the next time you open the program in the GUI editor the WRAP=OFF is reverted to WRAP=ON.

This message has been edited. Last edited by: Francis Mariani,


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server