SEAL Print Client JSON Schema¶
For each connector type, JSON schema files are available specifying the data structures in the panel and in the server settings. The user interface uses the schema for displaying the user interface elements and for validating the user input before sending data to the server.
Example - panel configuration file, panel.json
{
"name": "PLOSSYS 4",
"type": "print",
"pid": "f75bf1b0-6920-41cb-9fc8-a88191710f41",
"json_schema": {
"$schema": "http://json-schema.org/schema#",
"type": "object",
"required": ["Printer", "Copies"],
"properties": {
"Copies": {
"type": "number",
"description": {"de": Exemplare, "en": "Copies"},
"minimum": 1,
"default": 1
}
},
"fieldsets": [
{
"fields": [
"Printer",
"Copies"
]
}
]
}
}
Literature - JSON format and keywords
For further information about the general JSON format, refer to: http://json.org/json-de.html
For a helpful list of the available JSON keywords, refer to: https://ajv.js.org/keywords.html
Top Level Structure¶
name¶
name
specifies the panel name displayed in SEAL Print Client.
type¶
type
specifies the type of the panel.
The value is always print
and must not be modified.
pid¶
pid
specifies the unique panel ID.
The value must not be modified.
json_schema¶
json_schema
specifies the schema definition for the settings area of the panel. For available keys and values, refer to json_schema Structure below.
json_schema Structure¶
json_schema/$schema¶
$schema
specifies the used JSON schema.
The value is always http://json-schema.org/schema#
and must not be modified.
json_schema/type¶
type
specifies the type of the top level JSON schema element.
The value is always object
and must not be modified.
json_schema/required¶
required
specifies the array containing the names of the data elements that have to be specified by the system or user.
json_schema/properties¶
properties
specifies all data elements. Each data element contains an arbitrary name like Copies
or PLS_FLAGPAGE
used as key for storing the value specified by the user on server side and a set of key value pairs describing the data element.
properties/Capabilities
contains special settings which manages the visibility of the user interface elements depending on the information about the printer currently selected, for example, if the printer supports color or which formats are available for the printer.
json_schema/fieldsets¶
The fieldsets
array contains the fields displayed in the panel in the user interface. Each field specified in json_schema/properties
has to be contained here.
Data Element Structure¶
For each data element, the following keys are available. Here, only the keys relevant for the panel configuration are mentioned:
data_element/type¶
type
specifies the data type of the data element:
-
boolean
allows true and false. -
number
allows real numbers. -
string
allows a UTF-8-encoded character sequence. -
object
is a complex object type composed of properties which could contain objects again. For example, this data type is used forproperties/Capabilities
.
data_element/description¶
description
specifies the label of the field in the user interface. Thereby, different labels for the available languages can be specified.
data_element/widget¶
widget
specifies the user interface element used for the key.
-
checkbox
is a checkbox. -
crop
is a an element combining four number fields with percent or fix units. -
hidden
is an element not displayed in the user interface. -
number
is an editable field for numbers with a spinbox. -
password
is an editable field not showing the input, for example, for a password or a PIN. -
select
is an option menu. -
string
is a editable text field. -
toggle
is a radio button.
The available user interface elements depend on the data type:
Data Type | Available Widgets | Default |
---|---|---|
object |
crop , hidden |
hidden |
string |
password , select , string , toggle |
string |
boolean |
checkbox |
checkbox |
number |
number , password |
number |
data_element/oneOf¶
oneOf
specifies the options among which the user can select if an option menu ("widget": "select"
) or radio button ("widget": "toggle"
) is specified as user element.
Example - duplex options
"oneOf": [
{
"enum": [
"NONE"
],
"description": "Simplex"
},
{
"enum": [
"LONG_SIDE"
],
"description": "Duplex long side"
},
{
"enum": [
"SHORT_SIDE"
],
"description": "Duplex short side"
}
]
data_element/minimum¶
minimum
specifies the minumum that can be specified by the user if a number ("widget": "number"
) is specified as user element.
data_element/maximum¶
maximum
specifies the maximum that can be specified by the user if a number ("widget": "number"
) is specified as user element.
data_element/multipleOf¶
multipleOf
specifies the steps for the value that can be specified by the user if a number ("widget": "number"
) is specified as user element.
Example - step for numbers
"Rotation": {
"type": "number",
"description": "Rotation",
"default": 0,
"minimum": 0,
"maximum": 270,
"multipleOf": 90
}
data_element/visibleIf¶
visibleIf
specifies the keys and values on which the current data element depends.
Example - dependency
"MySpecialDuplex": {
"type": "string",
"description": "Special duplex value",
"visibleIf": {
"Capabilities/Duplex": [
true
]
}
}
Property to Parameter Mapping¶
Some generally used properties are mapped to settings for the backend system by the correspondent connector. In case of PLOSSYS netdome, the following properties are mapped:
SEAL Operator Property | PLOSSYS netdome Header Parameter |
---|---|
Printer | PLS_PLOTTER |
Copies | PLS_PLOTCOPY -1 |
Duplex | PLS_DUPLEX |
Quality | PLS_PRINT_QUALITY |
Color | PLS_PLOTPEN |
Format | PLS_PLOTSCALE |
rotationAngle | PLS_PLOT_ROTATE |
name | PLS_ORIG_NAME |
Hint - Y
and N
The PLOSSYS netdome (P4
) connector maps any boolean value, for example, true
, 1
or NO
, to Y
or N
accordingly and passes this to PLOSSYS netdome.