4D Blog

Home Product Images in absolute position in 4D Write Pro

Images in absolute position in 4D Write Pro

January 17, 2018

Product

Pictures speak louder than words, or so they say. In fact, according to researchers the brain processes images 60,000 times faster than words. 4D Write Pro is constantly evolving, version after version, to support more and more picture-related features. After in-line pictures and background pictures, 4D v16 R6 gives you the full control over picture insertion at a specific position in a document, in front of or behind text, as well as anchored to the page or specific parts of the document (i.e., header, footer, sections).

Example: how to handle pictures in absolute position

What’s possible now?

How to add aN IMAGE in absolute position?

To add a picture at a specific position, you first need to add the picture to the page with the new WP Add picture command. You can pass either a 4D picture variable or a path to a picture.

Then, you define its exact position using either the WP SET ATTRIBUTE command or the appropriate standard action. By default, the added picture is behind the text at the top left corner of the paper box and on all pages.

C_OBJECT($oImage)
C_TEXT($pictureFilePath)
$pictureFilePath:=Get 4D folder(Current resources folder)+"myPicture.png"

// Add an anchored image on the first page and horizontally centered

$oImage:=WP Add picture(vDoc;$pictureFilePath)
WP SET ATTRIBUTES($oImage;wk anchor page;wk anchor first page)
WP SET ATTRIBUTES($oImage;wk anchor horizontal align;wk center)

To learn more about handling pictures, please refer to this article in the documentation.

NEW Standard actions

New standard actions have been created to handle images in absolute position:

  • anchorLayout – defines whether the image is behind or in front of the text
  • anchorAlignVertical and anchorAlignHorizontal – define the horizontal/vertical alignment of the image (left, right, top, bottom, or centered)
  • anchorOrigin – defines the area (header, footer, paper edge) relative to the absolute position of the image
  • anchorPage and anchorSection – defines where the image is displayed (the page(s) or section(s) )
  • moveToBack and moveToFront – moves the image to the back or front

For more information, you can take a look at to the complete list of 4D Write Pro standard actions. Please also note that all existing standard actions applicable to images can also be used with images in absolute position.

New set of attributes

More possibilities are available for the WP GET ATTRIBUTES and WP SET ATTRIBUTE commands: a new set of selectors has been added to manage the new absolute position properties.

Here is an example of a few constants available for images in absolute position:

  • wk anchor layout – defines whether the image is behind or in front of the text
  • wk anchor horizontal align and wk anchor vertical align – define the horizontal/vertical alignment of the image (left, right, top, bottom, or centered)
  • wk anchor horizontal offset and wk anchor vertical offset – defines the horizontal/vertical offset of an image relative to the origin (wk anchor origin)
  • wk anchor page and wk anchor section – defines the page/section index or the type of page/section where the image is anchored

For more info, you can take a look at the complete list of 4D Write Pro attributes.

Discuss

Tags 4D Write Pro, Pictures, v16 R6, v17, Word processor

Latest related posts

  • January 22, 2026

    Transform Static Documents into Actionable Knowledge with AIKit

  • January 22, 2026

    Deploy Fluent UI effortlessly in your 4D applications

  • January 21, 2026

    Searching Across Host Projects and Components in 4D

Vanessa Talbot
Vanessa Talbot
• Product Owner •Vanessa Talbot joined 4D Program team in June, 2014. As a Product Owner, she is in charge of writing the user stories then translating it to functional specifications. Her role is also to make sure that the feature implementation delivered is meeting the customer need.Since her arrival, she has worked to define key features in 4D. She has worked on most of preemptive multi-threading new features and also on a very complex subject: the new architecture for engined application. Vanessa has a degree from Telecom Saint-Etienne. She began her career at the Criminal Research Institute as a developer for the audiovisual department. She has also worked in media and medical fields as expert in technical support, production as well as documenting new features.
  • Deutsch
  • Français
  • English
  • Português
  • Čeština
  • Español
  • Italiano
  • 日本語

Categories

Browse categories

  • AI
  • 4D View Pro
  • 4D Write Pro
  • 4D for Mobile
  • Email
  • Development Mode
  • 4D Language
  • ORDA
  • User Interface / GUI
  • Qodly Studio
  • Server
  • Maintenance
  • Deployment
  • 4D Tutorials
  • Generic
  • 4D Summit sessions and other online videos

Tags

4D-Analyzer 4D AIKit 4D for Android 4D for iOS 4D NetKit 4D Qodly Pro 4D View Pro 4D Write Pro 20 R10 21 21 R2 Administration AI Artificial Intelligence Build application Class Client/Server Code editor Collections Formula Listbox Logs Mail Microsoft 365 Network Objects OpenAI ORDA PDF Pictures Preemptive Programming REST Scalability Security Session Source control Speed Spreadsheet Tutorial UI User Experience vscode Web Word processor

Tags

4D-Analyzer 4D AIKit 4D for Android 4D for iOS 4D NetKit 4D Qodly Pro 4D View Pro 4D Write Pro 20 R10 21 21 R2 Administration AI Artificial Intelligence Build application Class Client/Server Code editor Collections Formula Listbox Logs Mail Microsoft 365 Network Objects OpenAI ORDA PDF Pictures Preemptive Programming REST Scalability Security Session Source control Speed Spreadsheet Tutorial UI User Experience vscode Web Word processor
Subscribe to 4D Newsletter

© 2026 4D SAS - All rights reserved
Terms & Conditions | Legal Notices | Data Policy | Cookie Policy | Contact us | Write for us


Subscribe to 4D Newsletter

* Your privacy is very important to us. Please click here to view our Policy

Contact us

Got a question, suggestion or just want to get in touch with the 4D bloggers? Drop us a line!

* Your privacy is very important to us. Please click here to view our Policy