4D Write Pro has been designed to create all kinds of documents, from the most simple to the most sophisticated. To achieve this diversity, documents can hold distinct parts, like paragraphs, sections, headers, footers, etc. Once filled in, 4D Write Pro behaves in such a way that all of these parts can be read. However, sometimes some parts must be resized according to their content. This is typically the case for headers and footers whose height can change automatically. This functionality is generally very useful, but sometimes it’d be more practical to set the heights of headers and footers to constant values (even if their content may be truncated and no longer be fully visible).
A new document parameter
The purpose of this document parameter is to determine whether headers and footers should be automatically resized based on their content or not. Just remember that the content of headers and footers can either be written by users or generated using 4D expressions that can return huge texts or images.
In most cases, the “auto fit” behavior is really useful. But what if the documents are generated using templates or some important constraints must be respected so that the generated documents correspond to the required paper format? In this case, it may sometimes be preferable to have truncated information in the header or footer, rather than in the main part of the document.
Compatibility with 4D Write documents
In the case of newly created documents, this parameter is set to “on” (i.e., auto-resize headers and footers will be activated), but in the case of imported 4D Write documents, then it will be “off” in order to maintain their 4D Write behavior.
Turning this parameter “on” or “off” is really simple:
WP SET ATTRIBUTES(WParea;wk header and footer autofit;True)
WP SET ATTRIBUTES(WParea;wk header and footer autofit;False)