4D Blog

Home Product A Handy New 4D Write Pro Attribute: wk page size!

A Handy New 4D Write Pro Attribute: wk page size!

May 6, 2024

Product

The WP SET ATTRIBUTES command in 4D Write Pro is undoubtedly one of the most frequently used commands, as its vast possibilities apply to all sorts of elements in your documents.

A new document attribute is now available in 4D 20 R5: wk page size. Let’s take a closer look at what it can do!

The feature in action

Document width and height

It is already possible to define the page size of your documents using the wk page width and wk page height attributes. The new wk page size attribute will set two values at once: the width and height of your document.

Another way to do this is to use the interface and directly choose the sizes suggested by the current printer. This option has also been improved!

Available formats, custom and ISO formats

Let’s start with the formats proposed automatically by the interface. Until now, the displayed list depended only on the capabilities of the current (selected) printer ①. From now on, this list will be complemented by custom formats, if any have been created by the user ②, and finally, the most common ISO formats, even if these are not available on your printer ③.

An attribute worth two

Regarding programming, it was already possible to define the width and height of pages. Thanks to this new parameter, this can be done in a single operation. The current printer format names (including custom ones) and all ISO formats can be used, from A0 to A10, B0 to B10, and C0 to C10, including DL, Legal, Legal Junior, and Tabloid.

Again, for ISO values, the format does not need to be available on the current printer; the page sizes of your documents will be defined based on the ISO values regardless of how they will be printed or exported.

WP SET ATTRIBUTES ($document;wk page size;"LegalUS") // ISO format  (no space between Legal and US !)
WP SET ATTRIBUTES ($document;wk page size;"Post card") // Printer format

Conclusion

Three features in one! Less code (one attribute instead of two), direct access to custom formats, and more freedom with ISO formats. Feel free to define any document formats for print or export! Let us know how you feel about this great tiny feature on the forum!

Discuss

Tags 20 R5, 21, 4D Write Pro, Document creation, Export, Printing, Word processor

Latest related posts

  • June 16, 2025

    Generate, share and use web sessions One-Time Passcodes (OTP)

  • May 20, 2025

    Automatic Refresh of OEM Build Licenses

  • May 16, 2025

    New class to handle incoming TCP connections

Roland Lannuzel
Roland Lannuzel
• Product Owner & 4D Expert •After studying electronics, Roland went into industrial IT as a developer and consultant, building solutions for customers with a variety of databases and technologies. In the late 80’s he fell in love with 4D and has used it in writing business applications that include accounting, billing and email systems.Eventually joining the company in 1997, Roland’s valuable contributions include designing specifications, testing tools, demos as well as training and speaking to the 4D community at many conferences. He continues to actively shape the future of 4D by defining new features and database development tools.
  • Deutsch
  • Français
  • English
  • Português
  • Čeština
  • Español
  • Italiano
  • 日本語

Categories

Browse categories

  • 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 for Android 4D for iOS 4D NetKit 4D Qodly Pro 4D View Pro 4D Write Pro 20 R8 20 R9 Administration Authentication Build application CI/CD Class Client/Server Code editor Collections Compatibility settings Formula Google Listbox Logs Mail Network Objects ORDA PDF Pictures Preemptive Programming Qodly Studio REST Scalability Security Session Source control Speed Spreadsheet Tutorial UI User Experience v20 vscode Web Word processor

Tags

4D-Analyzer 4D for Android 4D for iOS 4D NetKit 4D Qodly Pro 4D View Pro 4D Write Pro 20 R8 20 R9 Administration Authentication Build application CI/CD Class Client/Server Code editor Collections Compatibility settings Formula Google Listbox Logs Mail Network Objects ORDA PDF Pictures Preemptive Programming Qodly Studio 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