With the release of 4D 20 R5, you now have more comprehensive ways to define your 4D Write Pro document size through the Write Pro interface and programmatically. Along with the print size within the capabilities of the currently selected printer, the print size interface now also shows any custom formats created by the user and the most common ISO formats, even if they are not available on your printer.
Before, programmatically controlling the width and height of the page was done with two attributes: wk page width and wk page height. These attributes could only take in numeric values or CSS strings with the value and unit.
Now with 4D 20 R5, this can be done in one operation with the new attribute: wk page size. This parameter can be used with current printer format names (including custom ones) and all ISO formats. Priority is given to current printer format names over ISO sizes if they share the same name.
WP SET ATTRIBUTES(WParea; wk page size; "US Letter") //Current Printer format WP SET ATTRIBUTES(WParea; wk page size; "B2") //ISO format |
For more information on wk page size, see the 4D Blog post below:
https://blog.4d.com/a-handy-new-4d-write-pro-attribute-wk-page-size/