ONYX - 9.0 - Utilisation

OMR Code Management(KERN)

De MappingDoc
Révision datée du 3 janvier 2025 à 08:24 par Jdieu (discussion | contributions) (Page créée avec « Addition in the XML: <field name="OMR_mark_collation_break">NN</field> »)
Autres langues :
English • ‎français

This part details the steps necessary for calculating and printing KERN marks for controlling envelope inserting equipment. To do this, the starting point is an already composed and indexed XPS invoice document.


Calculation of OMR codes

From this indexed XPS document, the principle is to use the values ​​of a particular index (for example on the customer number = CustomerID in our case) to produce an M-Designer compatible XML file by integrating all the calculations. allotments, page and sequence modulos, breaks, etc. The main switch is -toXMLDRAW (to generate an XML Mapping file, called "XMLDraw"), to request XML output from the XPS document. This output is enriched with the following arguments and can be used on the command line (-param:NAME=value) or in a conversion profile:


counterinformation=on/off

Adds the document's page counters to the XML. It can be used without OMR code calculation.


Addition in XML: <field name="Counter_xxxxxxxxx">NN</field>


omrmark=CustomerID

Name of the index following which the OMR code calculations are carried out. Addition to the XML: batch information (folds) and modulos for displaying OMR bars


maxomrmark=NN


Maximum number of sheets per fold. This parameter influences the calculations but does not add anything additional to the XML.


omrduplex=on/off


The calculations are carried out taking into account the duplex mode in the finishing attributes of the XPS document. This setting influences calculations and adds sheet counters to the generated XML.

⚠️ Important note: Currently, sheet break detection relies only on the "JobDuplexAllDocumentsContiguously" and "PageForceFrontSide" printtickets (at the page level). This means that if the XPS document contains multiple subdocuments, switching from one subdocument to another will not be considered an automatic return to a single-sided page. This behavior differs from the default conversion from XPS to PCL, where a subdocument change forces a return to recto, unless this behavior is disabled via the "jobduplexalldocumentscontiguously" parameter in the map_xps< command /code>.


omrpagemodulo=7|8|4|15|R7|R8

Calculates and adds the page modulo to the XML file. The code changes on each page. Addition in the XML:

<field name="OMR_mark_page_1">NN</field>
<field name="OMR_mark_page_2">NN</field>
<field name="OMR_mark_page_3">NN</field>
<field name="OMR_mark_page_4">NN</field>


Meaning of values:

7 = decrement of a binary value from 7 to 1 (from 111 to 001)


8 = decrement of a binary value from 7 to 0 (from 111 to 000)


4 = decrement of a binary value from 4 to 1 (from 100 to 001)


15 = decrement of a binary value from 15 to 1 (from 1111 to 0001)


R7 = increment of a binary value from 1 to 7 (001 to 111)


R8 = increment of a binary value from 0 to 7 (from 000 to 111)


omrcollationmodulo=7|8|4|15|R7|R8


Calculates and adds the sequence modulo in the XML file. The code is the same on all pages of the same batch (same envelope) and changes each time the batch is broken.


Addition in the XML:

<field name="OMR_mark_collation_1">NN</field>
<field name="OMR_mark_collation_2">NN</field>
<field name="OMR_mark_collation_3">NN</field>
<field name="OMR_mark_collation_4">NN</field>


omrmarkbreak=boc|eoc


Break mark.


Meanings:


  • boc: the break mark is on the first page of each batch (by default).
  • eoc: the break mark is on the last page of each batch.


Addition in the XML:

<field name="OMR_mark_collation_break">NN</field>


omrfixedbars=nombre

Nombre de barres fixes souhaitées dans le code OMR.

Ajout dans XML :

<field name="OMR_mark_fixedbars_1">NN</field>
<field name="OMR_mark_fixedbars_2">NN</field>
<field name="OMR_mark_fixedbars_n">NN</field>


addindexvalue=on|off

Ajoute les valeurs des critères d’indexation du document XPS dans le fichier XML.

Ajout dans le XML:

<field name="index_CustomerID">XXX</field>


addtext=on|off

Ajoute les valeurs des informations textes du document XPS dans le fichier XML.

Exemple de commande :

map_xps -infile:/tmp/invoices.xps -toXMLDRAW -outfile:/tmp/invoices_omr.xml -param:omrmark=CustomerID
-param:counterinformation=on -param:addindexvalue=on -param:addtext=off -param:omrpagemodulo=7
-param:omrcollationmodulo=7 -param:omrduplex=on


Exemple de sortie XML :

<?xml version="1.0 encoding="UTF-16standalone="yes?>
<doc>
 Page 1 
<page name="NORMAL">
<field name="Counter_DocumentPage">29</field>		Nombre total de pages
<field name="Counter_CurrentPage">1</field>			Numéro de page courante
<field name="Counter_DocumentPageDuplex">29</field>	Nombre total de feuilles (*)
<field name="Counter_CurrentPageDuplex">1</field>		Numéro de feuille courante (*)
<field name="Counter_FrontSide">1</field>			Page recto ou verso
<field name="Counter_Document_Collation">20</field>	Nombre total de plis
<field name="Counter_Current_Collation">1</field>		Numéro du pli courant
<field name="Counter_Current_Collation_Pages">1</field>	Nombre de feuilles dans le pli courant (**)
<field name="Counter_Current_Collation_Page">1</field>	Numéro de feuille courante dans le pli courant (**)
<field name="OMR_Collation">start_end</field>		Type de feuille dans le pli courant (***)
<field name="OMR_mark_collation_break">1</field>		Marque de rupture
<field name="OMR_mark_fixedbars_1">1</field>		Barre fixe
<field name="OMR_mark_page_1">1</field>			modulo de page (valeur 4)
<field name="OMR_mark_page_2">1</field>			modulo de page (valeur 2)
<field name="OMR_mark_page_3">1</field>			modulo de page (valeur 1)
<field name="OMR_mark_collation_1">1</field>		modulo de séquence (valeur 4)
<field name="OMR_mark_collation_2">1</field>		modulo de séquence (valeur 2)
<field name="OMR_mark_collation_3">1</field>		modulo de séquence (valeur 1)
<field name="OMR_mark_parity">1</field>			Marque de parité (****)
<field name="index_CustomerID">10638</field>		Valeurs des index
<field name="index_InvoiceID">10000</field>
<field name="index_InvoiceDate">22/11/2008</field>
<field name="index_CustomerName">RENE POLFLIET</field>
<field name="index_MAPSUBJCT">Facture n° 10000 pour le client N° 10638</field>
<field name="index_MAPSEND">POLFLIET@sample.com</field>
<field name="index_NUMPAGE">PAGE 1</field>
</page>
 Page 2
<page name="NORMAL">
<field name="Counter_DocumentPage">29</field>
<field name="Counter_CurrentPage">2</field>
<field name="Counter_DocumentPageDuplex">29</field>
<field name="Counter_CurrentPageDuplex">2</field>
<field name="Counter_FrontSide">1</field>
<field name="Counter_Document_Collation">20</field>
<field name="Counter_Current_Collation">2</field>
<field name="Counter_Current_Collation_Pages">1</field>
<field name="Counter_Current_Collation_Page">1</field>
<field name="OMR_Collation">start_end</field>
<field name="OMR_mark_collation_break">1</field>
<field name="OMR_mark_fixedbars_1">1</field>
<field name="OMR_mark_page_1">1</field>
<field name="OMR_mark_page_2">1</field>
<field name="OMR_mark_page_3">0</field>
<field name="OMR_mark_collation_1">1</field>
<field name="OMR_mark_collation_2">1</field>
<field name="OMR_mark_collation_3">0</field>
<field name="OMR_mark_parity">1</field>
<field name="index_CustomerID">4274</field>
<field name="index_InvoiceID">10001</field>
<field name="index_InvoiceDate">27/3/2007</field>
<field name="index_CustomerName">GERARD DOUBLET</field>
<field name="index_MAPSUBJCT">Facture n° 10001 pour le client N° 4274</field>
<field name="index_MAPSEND">DOUBLET@sample.com</field>
<field name="index_NUMPAGE">PAGE 1</field>
</page>
…
</doc>


Remarques :

(*) Ces deux champs n’apparaissent dans le XML que lorsque le calcul OMR est effectué en mode recto/verso.

(**) En mode recto/verso, ces deux champs sont bien des compteurs de feuilles. En mode recto, ce sont des compteurs de pages.

(***) Valeurs possibles de type de page :

  • start : première page du pli
  • middle : page intermédiaire dans le pli
  • end: dernière page du pli
  • start_end : une seule page dans le pli

(****) La marque de parité permet d’avoir un nombre impair de barres.

Ajout des codes OMR

La deuxième étape consiste maintenant à réutiliser le fichier XML de données préalablement constitué pour apposer sur le document XPS d’origine alors considéré comme un calque, les marques KERN devant piloter le matériel de mise sous plis.


Voici ci-dessous un exemple de modèle M-Designer :

OX S OMR MD.png