Focal Point
PDF number of lines on each page

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

August 17, 2012, 05:24 AM
SWES
PDF number of lines on each page
Hello,

I'm experiencing two difficulties while creating output to PDF:

#1 the cause is a text block, which is a variable number of lines. The trouble is that I would like to see complete 'blocks' on each page, now the lines are cut off halfway and continue on the next page. The difficulty here is that it's impossible to determine how many 'blocks' would fit on each page. Therefore I assume that playing with the margins is only left as a solution? Or is there a way to tell FOCUS not to cut off those blocks?

#2 The next difficulty as that I make use of a report header and a page header. This I coded as follows:

ON TABLE SUBHEAD
"TEXT1"
" "
" "
" "
" "
" "
" "
"<TEXT2"
"<TEXT3"  
HEADING
" "
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     PAGESIZE='A4',
     LEFTMARGIN=0.430556,
     RIGHTMARGIN=0.430556,
     TOPMARGIN=0.680556,
     BOTTOMMARGIN=0.388889,
     SQUEEZE=ON,
     ORIENTATION=PORTRAIT,
$
TYPE=TABHEADING,
     IMAGE=\\IMAGE1.gif,
     POSITION=(-0.444444 -0.675),
     SIZE=(8.388889 2.000000),
$
TYPE=REPORT,
     IMAGE=\\IMAGE2.gif,
	 SIZE=(8.388889 1.180556),
$
TYPE=REPORT,
     IMAGE=\\IMAGE3.gif,
     POSITION=(0.000000 11.275000),
     SIZE=(8.388889 0.388889),




The report header is just perfect now (so preferably no changes here), but the thing is that the ´variable text block´ on page two and up are placed over the image meant as a page header... How to create extra space for the margins on pages two and up, while not changing the report header?

Thank you for looking into this.

Best,
SWES


WebFOCUS 8105m
Windows 7, All Outputs

Member of the Benelux Usergroup
August 17, 2012, 10:17 AM
RSquared
Here is a anippet of code that I used with a large text field t hat had to fit in the right hals of the page

/*

To calculate the number of lines, for a Page Break, when you have a very long field.

HOW_LONG/I5=ARGLEN (2028, ShortRec, HOW_LONG);
HOW_MANY_LINES/I5=HOW_LONG / 60;
LINES_FOR_THIS/I5=HOW_MANY_LINES + 5;
LINES_THRU_THIS/I5=IF BureauSortOrder NE LAST BureauSortOrder THEN (LINES_FOR_THIS + 5 ) ELSE
IF LINES_FOR_THIS + LINES_THRU_THIS GT 62 THEN (LINES_FOR_THIS + 5 ) ELSE
LINES_FOR_THIS + LINES_THRU_THIS;
BSOPAGENO/I2=IF BureauSortOrder NE LAST BureauSortOrder THEN 1 ELSE
IF (LINES_FOR_THIS + LAST LINES_THRU_THIS LT 63 ) THEN BSOPAGENO ELSE
BSOPAGENO + 1;
BSOPAGENUM/A3=EDIT ( BSOPAGENO );
BureauSortOrder1/A5=BureauSortOrder|BSOPAGENUM;
/*


Yow will have to play with the number of lines per page as well as the width of each line.


WF 7.6.11
Oracle
WebSphere
Windows NT-5.2 x86 32bit
August 17, 2012, 11:06 AM
susannah
refreshing to see someone using WF 5 Smiler

swes, it doesn't seem that you are using the pdf composer method of preparing a complex pdf report. it seems that you might just be turning compound on and off, and just letting your elements fall where they may.
[Having said that, i'm still in version 76, and the composed method of pdf preparation may have changed.]
In the composer method, you prepare each of your page components separately, and then lay them out exactly where you want them.
if you want to pm me with your email address, i'll send you some code.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
August 22, 2012, 03:18 AM
SWES
It seems like I’m on the right track by opening the report in the composer. The thing is that I can’t figure out how I could add a title page in the report. I’ve tried the option: ‘Menu > Insert > Add Page Master Layout’ but that does not seem to do the trick.. When I do that the image header only overlaps the image header on the regular page. What would you suggest?


WebFOCUS 8105m
Windows 7, All Outputs

Member of the Benelux Usergroup
August 24, 2012, 04:46 AM
SWES
Does anyone have a clue?

Thank you


WebFOCUS 8105m
Windows 7, All Outputs

Member of the Benelux Usergroup
August 24, 2012, 06:05 AM
atturhari
PAGELAYOUT=1, NAME='Page layout 1', text='Page layout 1', TOC-LEVEL=1, BOTTOMMARGIN=0.33, TOPMARGIN=0.5,......
COMPONENT='table1', TEXT='table1', TOC-LEVEL=2, POSITION=(0.50 +0.2), .......

Using POSITION=(0.50 +0.2) you can place your first component on any desirable position on the first page.

For the 2nd page and up, you can control the margin using TOPMARGIN=0.5,
August 27, 2012, 06:55 AM
SWES
Thank you for your reply atturhari.

The thing is that my project only consists of one component: the report itself.

Without luck I tried to change the properties of the second page with PAGELAYOUT=2 but that didn't do the trick..

So the question remains: which code can I use to have different margins on the second page and up??


WebFOCUS 8105m
Windows 7, All Outputs

Member of the Benelux Usergroup
August 28, 2012, 08:58 AM
SWES
Anyone?


WebFOCUS 8105m
Windows 7, All Outputs

Member of the Benelux Usergroup
September 10, 2012, 06:56 AM
SWES
Would anyone have suggestions for me, as I need this urgently?

Thank you.


WebFOCUS 8105m
Windows 7, All Outputs

Member of the Benelux Usergroup