ONYX - 9.0 - Utilisation

OMR Code Management(KERN)

De MappingDoc
Révision datée du 3 janvier 2025 à 08:30 par Jdieu (discussion | contributions) (Page créée avec « Below is an example of an M-Designer template: »)
(diff) ← Version précédente | Voir la version actuelle (diff) | Version suivante → (diff)
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=number


Number of fixed bars desired in the OMR code.


Addition in 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


Adds the XPS document indexing criteria values ​​to the XML file.

Addition in the XML:

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


addtext=on|off


Adds the text information values ​​of the XPS document to the XML file.

Example order:

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>		Total page number
<field name="Counter_CurrentPage">1</field>			current page number
<field name="Counter_DocumentPageDuplex">29</field>	Total sheet number (*)
<field name="Counter_CurrentPageDuplex">1</field>		current sheet number (*)
<field name="Counter_FrontSide">1</field>			Page front or back
<field name="Counter_Document_Collation">20</field>	total number of collations
<field name="Counter_Current_Collation">1</field>		current collationnumber
<field name="Counter_Current_Collation_Pages">1</field>	number of sheet in the current collation(**)
<field name="Counter_Current_Collation_Page">1</field>	current sheet number in the current collation(**)
<field name="OMR_Collation">start_end</field>		type of sheet in the current collation(***)
<field name="OMR_mark_collation_break">1</field>		breaking mark
<field name="OMR_mark_fixedbars_1">1</field>		Fixed Bar
<field name="OMR_mark_page_1">1</field>			modulo of page (value 4)
<field name="OMR_mark_page_2">1</field>			modulo of page (value 2)
<field name="OMR_mark_page_3">1</field>			modulo of page (value 1)
<field name="OMR_mark_collation_1">1</field>		modulo of sequence (value 4)
<field name="OMR_mark_collation_2">1</field>		modulo of sequence  (value 2)
<field name="OMR_mark_collation_3">1</field>		modulo of sequence  (value 1)
<field name="OMR_mark_parity">1</field>			Marque of parity (****)
<field name="index_CustomerID">10638</field>		Valeurs of 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">Invoice n° 10000 for customer 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>


Notes:


(*) These two fields only appear in the XML when the OMR calculation is carried out in double-sided mode.


(**) In double-sided mode, these two fields are indeed sheet counters. In single-sided mode, these are page counters.


(***) Possible page type values:


  • start: first page of the cover
  • middle: intermediate page in the fold
  • end: last page of the cover
  • start_end: only one page in the fold

(****) The parity mark allows you to have an odd number of bars.


Added OMR codes

Translations:ONYX:9.0:Usage:Management of OMR codes (KERN)/49/en The second step now consists of reusing the previously created XML data file to affix the KERN brands to the original XPS document, then considered as a layer, to control the envelope inserting equipment.


Below is an example of an M-Designer template:

OX S OMR MD.png