KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Page Setup with a 4D Write Offscreen Area
PRODUCT: 4D Write | VERSION: 6.7.1 | PLATFORM: Mac & Win
Published On: June 22, 2001

When using a newly created 4D Write offscreen area, the Page setup settings are the default settings. You may want to use custom page setups that have already been set and validated for a template stored in a picture field. If you use WR INSERT PICTURE IN AREA to append contents in the offscreen area, the text will be flowed into the offscreen area but the page setup will not be altered.

To alter the page setup before printing, you can use code similar to this in the object method of the button for printing:

Case of
 : (Form event=On Clicked)
 $MyPict:=WR Area to picture (Field3)
 $Offscreen:=WR New offscreen area
 WR PICTURE TO AREA($Offscreen;$MyPict)
 $MyPict2:=WR Area to picture (Field4)
 $err:=WR Insert picture area ($Offscreen;$MyPict2;0)
 WR PRINT ($Offscreen;0;1)
 WR DELETE OFFSCREEN AREA ($Offscreen)
End case

In this example, the page setup of the template (Field3) is used for the offscreen area and the contents of Field4 are flowed in the offscreen area.