ONYX - 9.0 - Utilisation

XPSConfig file generalities

De MappingDoc
Révision datée du 2 janvier 2025 à 15:28 par Jdieu (discussion | contributions) (Page créée avec « ===1D barcode management=== »)

<language/>

The configuration file: xpsConfig.conf

Definition

All conversions from the pivot XPS format to the destination languages ​​are handled natively in the engine. They are defined and refined by different fully configurable conversion profiles and stored in a configuration file called XPSConfig.conf. Physically, this file is located in the folder defined by the XPSCONFIG configuration variable.

Example on Windows:

[XPSCONFIG] C:\Program Files\M-Processing Server\Settings\XPSConfig.conf

Example on Linux:

[XPSCONFIG] /apps/mapping/conf/XPSConfig.conf


Structure and syntax

The general structure of the XPSConfig.conf file is based on XML syntax:

<xpsconfig>
  <profile_1>
         <param_1>valeur</param_1>
         <param_2>valeur</param_2>
         <param_3>valeur</param_3>
          …
   </profile_1>
   <profile_2>
           <param_1>valeur</param_1>
           <param_2>valeur</param_2>
           …
   </profile_2>
           …
</xpsconfig>

As many conversion profiles as necessary can be declared depending on the different input/output channels of production documents. Each profile must have a unique name which will be used by Spooler Mapping or on the command line to identify the correct conversion profile. For each profile, all the useful parameters allowing the conversion to be carried out, refined and optimized are provided.


Important:

All information contained in this configuration file is case sensitive: name of the different profiles, names and values ​​of the parameters.


Note:


All parameters documented below can also be used on the command line and can be overridden when calling a map_xps conversion command. The syntax for calling a particular parameter is then: -param:parameter_name=value.

Generic parameters

Some parameters are generic and can be used in all profiles regardless of the conversion language.


Language

This first parameter is required for all profiles. It defines the output language of the conversion. The syntax in the profile is:<language>PCL</language>

Here is the list of all output formats supported by ONYX Server:

  • XPS (default language if not specified in the profile)
  • Print languages:
    • PCL
    • ZEBRA
    • AFPDS
    • PGI
    • PS (PostScript)
    • TEC
    • PROPRINTER
    • EPL
    • ESCP
    • MONARCH
    • XMLPOS
    • DPL (Datamax)
    • DB4


  • Web languages:
    • HTML
    • RTF
    • PDF
    • DOCX
    • TXT


  • ONYX Server outputs:


MAPDRAW (used for importing XPS assets into M-Designer)


  • Image outputs:

IMAGE

BMP

Label

This optional parameter allows you to give a user description to the profile. This description will be used in particular in the ONYX Server Spooler for configuring print queues (XPS compatibility parameter).


The syntax in the profile is:<label>PCL5 printing in black and white</label>


Color

This optional parameter allows you to activate or deactivate color conversion for destinations that support it. When this parameter is not specified in the profile, the principle is to respect a conversion faithful to the original XPS document. So, for destinations that support it, color conversion is enabled by default.


The syntax in the profile is: <color>on</color>


Supported values: ON/OFF, on/off, YES/NO, yes/no, 0/1


Default value: ON, except for the AFPDS language.


For languages ​​that support it, ICC (International Color Consortium) color profiles are also supported, with the syntax: <outputICC>path_to_ICC_file</outputICC>


Code page

This optional parameter allows you to define the output code page for destinations that support it. The syntax in the profile is:<codepage>850</codepage>


Supported values: depending on the output language


Default value: dependent on output language


Resolution

This optional parameter allows you to define the output resolution of the document expressed in dpi (dots per inch). The syntax in the profile is:<resolution>240</resolution>

Supported values: 200, 300, 600....


Default value: that of the defined output language


For destinations that support it, the resolution (in dpi) of the document images can also be specified with the syntax: <resolutionimage>240</resolutionimage>


Supported values: 203, 300, 600…

Default value: that of the defined output language


Rotation

This optional parameter allows you to define the rotation angle (anti-clockwise or trigonometric) of the output pages. The syntax in the profile is:<pagerotation>90</pagerotation>

Supported values: 0, 90, 180, 270

Default value: 0 (no rotation)


Paper Size

This optional parameter allows you to modify the format of the output pages. The size of the pages as well as the content will be recalculated. The syntax in the profile is:<changeformat>Letter</changeformat>

Supported ISO standard values: A2, A3, A3 Extra, A4, A4 Plus, A4 Extra, A5, A5 Extra, A6, B4, B5, B5 Extra, B6, Envelope #9, Envelope #10 , Envelope #11, Envelope #12, Envelope #14, Envelope B4, Envelope B5, Envelope B6, Envelope C3, Envelope C4, Envelope C5, Envelope C6, Envelope C65, Envelope DL, Envelope Invite, Envelope Monarch, Envelope, Executive, Folio, German Legal Fanfold, German Std Fanfold, Japanese Postcard, Japanese Double Postcard, Ledger, Legal, Legal Extra, Letter , Letter Extra, Letter Plus, Letter Small, Note,PRC 16K, PRC 32K, PRC 32K(Big), PRC Envelope #1, PRC Envelope #2, PRC Envelope #3, PRC Envelope #4, PRC Envelope #5, PRC Envelope #6, PRC Envelope #7, PRC Envelope #8, PRC Envelope #9, PRC Envelope #10, Quarto, Statement, SuperA, SuperB, Tabloid, Tabloid Extra, US Std Fanfold.


Custom values ​​are also supported, with the syntax:<changeformat>xx.xx,xx.xx[,cm|in|mm]</changeformat>


  • two decimal values, separated by a comma corresponding to width and height respectively
  • The decimal separator is ‘.’
  • The unit is optional: cm (default), mm or in (for inch)
  • The brackets should be removed (they symbolize the optional aspect)


Image output

This optional parameter allows conversion to image mode, for languages ​​that support it. The size of the flows is not optimal but the rendering of all elements is thus guaranteed. The syntax in the profile is:<fullimage>on</fullimage>


Supported values: ON/OFF, on/off, YES/NO, yes/no, 0/1


Default value: off


Interval between 2 labels

This optional parameter allows you to define, for thermal languages, the distance between two labels. The value is expressed in points. The syntax in the profile is:<gap>24</gap>


Page offset

These optional parameters allow you to shift all the pages of a document without changing the margins. Values ​​are expressed in 96dpi and are decimal. The syntax in the profile is:

<XpsTopOffset>10.2</XpsTopOffset>
<XpsLeftOffset>8.1</XpsLeftOffset>


Image resizing quality

This optional parameter allows you to improve the quality of image resizing in order to make it more precise. The syntax in the profile is:<precisemode>on</precisemode>


Supported values: ON/OFF, on/off, YES/NO, yes/no, 0/1


Default value: off


Font management

The XPS document contains all the resources necessary for its display including, in particular, the fonts used in ODTTF format. In conversion to an output language, the choice is possible whether or not to embed the fonts in the flow. This choice will depend on the languages ​​and printing equipment.


Embedded fonts

This optional parameter allows you to activate or deactivate the incorporation of fonts in the final document. When this setting is enabled, the fonts used in the XPS document will be embedded in the output stream and therefore sent to the printer. Otherwise, the printer's resident fonts will be used for printing. When this parameter is not specified, it is enabled by default. The syntax in the profile is: <embeddedfont>ON</embeddedfont>


Supported values: ON/OFF


Default value: ON (except for AFPDS, PS and RTF languages)


When this setting is disabled, another setting allows you to force the use of a default resident font for any undeclared XPS font (see below). The syntax in the profile is:<defaultfont>1</defaultfont>


Supported values: from 1 to n, identifying the number of the font match to use by default in the profile.


Default value: 1


Resident fonts

When the previous setting is disabled, it is necessary to predict the correspondence between the fonts of the XPS document and those to be used on the printer. This correspondence table is constructed in the profile with the following syntax:

<fonts>
          <font name="Arial" size="10" height="100" italic="0" bold="0" zoomx="1" zoomy="1" codeFont="4" />
          <font name="Tahoma" size="10" height="100" italic="0" bold="0" zoomx="1" zoomy="1" codeFont="A" />
          …
          </fonts>


In this table, between one and five parameters are used to identify XPS fonts:


  • name = XPS font name (required)
  • size = size in points of the font (optional)
  • height = height or vertical deformation in percentage (optional)
  • italic = italicized font or not (optional)
  • bold = bold font or not (optional)


Then between one and five parameters are used to identify the resident font that should be called:


  • codeFont = resident font number to use for printing (required). The values ​​depend on the printing language and printer model and are generally given by the printer manufacturer.


Examples:


- for a Zebra printer, the values ​​go from A to Z, or from 1 to 9


- for an Eltron printer, the values ​​range from 1 to 5


  • zoomx = size to width multiplication factor (optional)
  • zoomy = size-height multiplication factor (optional)
  • type = resident font type (bitmap or vector) in TEC language (optional)
  • fgid = AFP font identifier (optional)


1D barcode management

Les codes-barres 1D étant également rendus par des polices de caractères, le même choix que précédemment est possible en fonction des langages et du matériel d’impression.


Code barres embarqué ou résident

Ce paramètre, optionnel, permet, pour les langages thermiques et l’AFPDS, d’activer ou de désactiver le rendu des codes-barres 1D par les imprimantes elles-mêmes. Lorsque ce paramètre est activé, l’impression des codes-barres est gérée par l’imprimante en utilisant ses polices résidentes. Sinon, les polices utilisées dans le document XPS seront embarquées dans le flux et donc envoyées à l’imprimante. Lorsque ce paramètre n’est pas renseigné, il est activé par défaut.

La syntaxe dans le profil est :<barcode>PRINTER</barcode>

Valeurs supportées : IMG, FONT, PRINTER

Valeur par défaut : PRINTER

IMG : embarqué sous forme d'image
FONT : embarqué sous forme de police
PRINTER : le code barre est généré par l'imprimante

Rendu imprimante

Lorsque le paramètre précédent est activé, il est nécessaire de prévoir la correspondance entre les polices du document XPS et celles à utiliser sur l’imprimante. Cette table de correspondance se construit dans le profil avec la syntaxe suivante :

<barcodes>
<barcode type="21" size="35" height="200" bcheight="40" bcwidth="A,B" />
…
</barcodes>


Dans cette table, trois paramètres servent pour identifier les polices XPS :

  • type = type du code-barres (voir tableau ci-après)
  • size = taille en points de la police
  • height = hauteur ou déformation verticale en pourcentage


Puis deux paramètres servent à personnaliser les dimensions physiques d’un code-barres à l’impression :

  • bcheight = hauteur désirée du code-barres (en points)
  • bcwidth = largeur désirée du code-barres en précisant par exemple la largeur d’un élément fin et le ratio entre élément fin et épais

La syntaxe et les valeurs de ces deux paramètres dépendent du langage final d’impression et du type de code barre. Liste des codes à barres supportés par ONYX Server, avec leur type :

2 PDF 417
11 Data Matrix
12 QR Code
14 MaxiCode
17 EAN 13
18 EAN 8
19 Code 39
20 Code 39 sans contrôle
21 Code 128 alpha optimisé
22 Code 128 alpha non optimisé
23 Code 128 numérique
24 2 Parmi 5 Entrelacé
25 2 Parmi 5 Entrelacé sans contrôle
26 2 Parmi 5 Industriel
27 2 Parmi 5 Industriel sans contrôle
28 EAN 128 alpha non optimisé
29 EAN 128 numérique
30 EAN 128 alpha optimisé
31 Postnet
32 Planet
35 Native
77 Japan Postal
78 Codabar
79 USPS
80 UPC-A
81 UPC-E
82 MSI
83 MSI 2 mod. 10
84 MSI mod. 11
85 MSI mod. 11 mod. 10
86 MSI no check