ONYX - 9.0 - Utilisation

Document footer management in XML

De MappingDoc
Révision datée du 21 décembre 2024 à 08:15 par Jdieu (discussion | contributions) (Page créée avec « The group must be conditional on not triggering a page break:<br /> 800x800px <br /> »)
Autres langues :
English • ‎français

Introduction

This section describes how to dynamically manage fixed height document feet (present only on the last page) within a document.

Prerequisites

  • Have a good foundation on how Designer works in XML mode
  • Know the structure of the XML Designer file

Principle

The idea is to integrate the document footer into a group or into text boxes. Indeed, the objects containing the document footer must be either text areas (text objects) or groups, because they must be processed by the program after the execution of the group potentially generating a page break. These objects will be conditioned on "not triggering" a page break on the page. Concretely, these objects will only be displayed if the current page does not generate a page break, which means that they will only appear on the last page of the document.

Additionally, it is essential to ensure that the footer(s) can fit in the space on the page. So the main group (which generates a page break) must check that the document footer has enough room to display. If this is not the case, a page break must be made before writing the document footer. To do this, a specific type of line will be used at the end of the main group in order to create an area whose height (working space) will be at least equal to that of the document footer.

Example

Reservation of space for the document footer

The idea is to use the following group as a document footer. In our example, we have a special line at the end of the main group named RESA_SPACE. We apply a zone with a front spacing of 3cm. (this allows you to reserve the place for the document foot)

Resafooter1.png


We condition the RESA_SPACE zone on the presence of the line type "RESA_SPACE"


Resafooter2.png


Management of the appearance of the document footer

In our case, the document footer is 2 tables (VAT breakdown and totals table)


Pied de document.png


This includes all the elements required to design the VAT breakdown table of a document. This must only be present on the last page of the document.

The group must be conditional on not triggering a page break:
Pieds de page cond.png