Full size background pictures with 4D Write Pro

There are common user stories where there is a need to have a background image fill the entire printable area, such as paper-folding lines or a watermark. It’s also sometimes required by a company’s graphic charter.

Thanks to a newly added style for background images, it is now possible to create background pictures filling the full page in 4D Write Pro! You can control this attribute, by either the 4D language or standard actions, or even by using the 4D Write Pro widget.

For a better understanding, this feature can be summarized with the illustration below:

Many options are available for background pictures, including clipping, repeating pattern and origin. Images could already be clipped to the border, the padding or to the content in previous versions. But they could not be clipped to the “paper”. Now they can!

The new attribute value (wk paper box) is available for documents/sections for background clipping and background origin.

Of course, the 4D Write Pro widget has also been updated: when selecting the “background picture” and “document” items, the clip and origin options now have a new paper-box option available.

Example database

Programming options

You can use the WP SET ATTRIBUTES command and set the new wk paper box value for background picture clipping and origin.

WP SET ATTRIBUTES(wpDoc;wk background image;vPict)
WP SET ATTRIBUTES(wpDoc;wk background clip;wk paper box)
WP SET ATTRIBUTES(wpDoc;wk background origin;wk paper box)

Another option is to use the standard actions with the INVOKE ACTION command, or in design mode as any other standard action.

// Set origin and clipping for document background image
INVOKE ACTION("doc/backgroundClip?value=paper-box")
INVOKE ACTION("doc/backgroundOrigin?value=paper-box")

Caroline Briaud
• 4D Product Team Leader •Caroline joined 4D SAS in July, 2013 as an Engineering Manager responsible for new features definition. Caroline helped the Engineering team to put in place the R-release concept, with the new development process definition and its application within 4D’s engineering teams.Caroline is now leading the 4D Product team, mainly made up of Product Owners which are representing the customers within Engineering.Caroline started her career as a software developer in the mobile phone industry. She specialized in program management with an American company in an international context spread across US, India and China.