4D Blog

Home Product Page layout in 4D Write Pro

Page layout in 4D Write Pro

November 7, 2018

Product

When creating a 4D Write Pro document, you need to define the page size, orientation, and margins. Starting with v17 R3, you can do all this by programming. And for that, new attributes are at your disposal.

You can set the properties for an entire 4D Write Pro document. These values are used by default for all sections of the document. You can then change them for a given section.

As you may have guessed, these changes are made with the WP SET ATTRIBUTES command. You can also retrieve values with WP GET ATTRIBUTES.

The new attributes are:

  • wk page width, wk page height – for page size
  • wk page orientation – for page orientation
  • wk page margin, wk page margin left, wk page margin right, wk page margin top, wk page margin bottom – for page margins

Examples

For example, this document is in landscape orientation, except the second section:

WP SET ATTRIBUTES(wpDoc; wk page orientation; wk landscape)
$section:=WP Get section(wpDoc;2)
WP SET ATTRIBUTES($section; wk page orientation; wk portrait)

As another example, to retrieve the size of the page:

WP GET ATTRIBUTES(wpDoc; wk page width; $width; wk page height; $height)

 

Discuss

Tags 4D Write Pro, v17 R3, v18, Word processor

Latest related posts

  • October 23, 2025

    Starting Qodly studio is just two clicks away

  • October 22, 2025

    Localize your Qodly Pages: A Practical Guide

  • October 21, 2025

    New Way to Control Your HTTP Responses

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 AIKit 4D for Android 4D for iOS 4D NetKit 4D Qodly Pro 4D View Pro 4D Write Pro 20 R10 21 Administration AI Artificial Intelligence Build application CI/CD 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 v20 vscode Web Word processor

Tags

4D AIKit 4D for Android 4D for iOS 4D NetKit 4D Qodly Pro 4D View Pro 4D Write Pro 20 R10 21 Administration AI Artificial Intelligence Build application CI/CD 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 v20 vscode Web Word processor
Subscribe to 4D Newsletter

© 2025 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