OPALE - 10.0 - Usage

Dynamic Part (Map)

De MappingDoc
Cette page est une version traduite de la page OPALE:10.0:Utilisation:Partie Dynamique (Map) et la traduction est complétée à 100 %.

Autres langues :
English • ‎français

Definition:

The "MAP" part of a project corresponds to the dynamic part of designs that are made according to the datastreams processed by the template. The main elements which can be placed in this part are data files printable information.

To design this part, select the "Map F" tab (and "Map B" for the duplex of the document). In this view, elements of the "Draw" part are displayed as watermarks so that positioning the data to be printed is easier.


"Spooled File"

To retrieve and identify data to be printed, designing a Designer project is done using an example file. This example file is an image of the production spooled file to format.

Designer  supports two types of data files in native mode: paginated text files and XML files in Mapping format. Input file types are configured in the project properties.


Text files usually have a ".PAG" extension because they need to be paginated: the DESIGNER application does not manage pagination in SPLF mode.

Text files can be paginated by running the "MAPPAGIFS" command in OPALE Server where an argument specifying the number of lines per page ("Overflow") will be given.

XML files need to respect a particular syntax so that the application can properly process them.

To open and display an example file in DESIGNER, the spooled file view needs to be activated in the "Display" Menu.


FichierSpool.PNG


In the "Home" tab, click on "Load spooled file" and select the file you want to load in the application.

The spooled file view then displays the data from the spooled file to format.


Note:

To help you design your project, you can preview the result without having to print the document.

To do so, click on the corresponding button in the "Home" menu.


XML mode: syntax and specifications


In XML mode, the design principles are the same and are put in application using an example file loaded in the application.

ModeXML.PNG

Once the document is loaded, do not forget to check that the mode = XML in the project properties.

The spooled file view is then called the XML view and displays the content of the file in a tree view.


Data Structure :

XML files that are processed by Designer in native mode have to respect a specific pattern and syntax, such as:


Donnees-XML.PNG

















  • The <page name="..."> … </page> tags mark out the pages of the document. In the last example, there is only one page.
  • The <field name="...">value1</field> tags correspond to unit-based information (the equivalent of ‘zones’/'fields' in Designer).
  • The <group name="..."> … </group> tags refer to a particular number of lines which contain zones, such as a ‘group’ in Designer.
  • The <line name="…"> … <line> tags correspond to the lines inside of these groups.

If we were to use this structure with a paper invoice:

<page name="..."> … </page> corresponds to the pages of the invoice.

<group name="..."> … </group> marks out the body of the invoice (from the first line to the last).

<line name="…"> … <line> describes every line in the body of the invoice.

<field name="...">value1</field> can correspond to two things:

  • If this tag is on the outside of a group, that is to say on the outside of the <group> </group> tags, it can correspond to unit-based information in the invoice. In which case, value1 corresponds to the invoice number in the header, for instance, or to the client number, the type of invoice, etc.
  • If this tag is inside a group, value1 corresponds to the value of the zone in the line. For instance, the product code, its name, price, etc.


XML pattern specifications:

The specifications needed for Designer to process the file are the following:

  • The XML header needs to specify the file encoding.

Example: <?xml version="1.0" encoding="UTF-16" standalone="yes" ?>

  • The root tag of XML data needs to be called "doc".
  • All tags mentioned hereafter need to have at least one attribute named "name". Information will be identified, retrieved and formatted by the application via the use of this attribute.
  • The tags and attributes names are case-sensitive and need to be written in lowercase letters.
  • For the application to access it, data must be placed in pages in between the <page name="…"> and </page> tags. One document can contain several pages.
  • Inside a page, data is organised per unit-based fields (<field name="…"> tag), or per information groups (<group name="…"> tag)
  • Information groups are composed of lines (<line name="…"> tag)
  • The lines contain unit-based informations (<field name="…"> tag)


Donnes xml1.PNG
























Note:

XML data can be placed on the outside of a page as information linked to the overall document and not to the page in particular. However this data will not be accessible to Designer and thus cannot be processed to design the document. Nonetheless, this data can be used in the Opale Server engine.


XML view in Designer:

An XML example file is loaded in DESIGNER in the same way that is use to load a text file. In the XML view, data is displayed as a list of elements.

VueXML.PNG


First dynamic elements:

1.Zone:

As the main element, a zone retrieves information in the input data to position and format it in the final graphic document.

In texte mode, information is identified by 3 types of data: the line number, the column number and the length. In XML mode, it is identified by the name of the XML field (field tag).

A zone can only read one line at a time. In the designing space, it is represented by its name which is framed by a blue rectangle:


Zone.PNG


To create a zone:

Select the zone to retrieve in the spooled file and use the "drag and drop" method to place it in the designing space:


Zone1.PNG


Once the zone is placed, the properties view opens, fill in the information about the zone:

Name:

  • Name of the zone: this information is specific to Designer and allows it to identify the various objects in the project
  • XML field: name of the XML field that identifies the information (only in XML mode)
  • Text printed before/after: you can add text before and/or after the retrieved information

Position in the document:

  • Changes the position of the zone in the page

Position:

  • Identifies where the information is positioned in the data spooled file: line, column, length.
  • Retrieves information in XML mode

Data type:

Defines the way in which the Designer application processes the retrieved information (see below)

Font:

  • Configures all the formatting options for the information: font, size, colour, framing, orientation, etc.


Note:

When using the "drag and drop" in the spooled file view, the position of data is automatically filled in according to the selection. The latter can be adjusted if necessary.

Creating a zone can also be done using the Iconezone.PNG icon which is located in the "Mapping" toolbar. The position of data will then have to be filled in manually.


Type of zones: Designer offers multiple options to process information.

  • Text: prints out simple text
  • Barcode: encodes and prints out barcodes
  • Tools: inserts a page number, images, …
  • Archive: indexes the document to archive it (non printed zones)
  • Memory: memorises (non printed) information to reuse it later
  • Graph: designs graphs
  • Conversion: converts numbers (Euro to Dollars for instance)


Note:

To insert a carriage return in the zone, type \x0A in the field "Text printed after" in the properties of the zone.


2.Group:

A group allows you to retrieve several lines of a spooled file. A group consists of a beginning line and an end line. It is shown in red in the designing space:


Groupe.PNG


A group can be fixed (fixed lines at the beginning and end) or variable (variable lines at the beginning and end).

To create a fixed group:

Select the bloc of lines to retrieve in the spooled file, then use the "drag and drop" method to place the group in the designing space.


Groupe1.PNG


The properties view opens, fill in the information about the zone:

Zone:

  • Name: this information is specific to Designer
  • In XML mode, it is the name of the "group" tag

Position in the document:

  • Identification of the beginning and end lines of the information bloc to retrieve
  • Shift: printing position of the first line in comparison with the group

Option:

  • Exclusive conditions: one true condition is applied by line in an exclusive way, without testing the following lines.

Variable:

  • changes the type of group: from fixed (the beginning and end lines are static) to variable (the beginning and end lines are variables, this is defined by conditions)


Note:

When using the "drag and drop" in the spooled file view, the beginning and end lines are automatically filled in. The latter can be adjusted if necessary.

You can also create a fixed group using the icon that is located in the "Mapping" toolbar. The beginning and end lines will then have to be filled in manually.

No information will be printed if you ask for a preview, because a group only defines tags in between which information must be retrieved in the spooled file.

You will need to determine the position of the information to be retrieved and printed between these two tags (beginning and end lines) by adding zones in the group:


Groupefixe.PNG


To create a variable group:

The aim of a variable group is the same as that of a fixed group: retrieve several lines of information in the spooled file. Use the fixed group when the information to retrieve has a fixed position in the spooled file (never changes), use the variable group to retrieve information that does not have a fixed position beforehand.

A group can vary:

  • in size: beginning and end lines are determined dynamically by conditions
  • and/or in printing position: variable groups can be linked one to another, the n+1 group then starts to be printed as soon as the n group is printed entirely.

To create a variable group, click on the Iconegroupe.PNG icon, then draw the group in the designing space. The Properties view opens, fill in the information about the group.