﻿{
  "openapi": "3.0.1",
  "info": {
    "title": "ZPLPrinter Web API",
    "description": "[ZPLPrinter Web API](https://neodynamic.com/products/zpl-printer-web-api-docker) is a virtual printer emulator that can process ZPL (Zebra Programming Language) commands generating the output rendering in well known raster image and document formats like PNG, JPG, PDF, TIFF, PCX, Zebra GRF ASCII hex, Zebra EPL Binary Graphic, Honeywell-Intermec FingerPrint Binary Graphic, EPSON ESC/POS NV Binary Graphic & HP-PCL Binary Graphic.",
    "contact": {
      "name": "Neodynamic",
      "url": "https://neodynamic.com/support",
      "email": ""
    },
    "license": {
      "name": "Use under Neodynamic EULA",
      "url": "https://neodynamic.com/eula"
    },
    "version": "v7"
  },
  "paths": {
    "/ZPLPrinter": {
      "post": {
        "tags": [
          "ZPLPrinter"
        ],
        "summary": "Processes the ZPLPrintJob object and generates the output for the specified ZPL commands in the format specified to the Accept header.",
        "requestBody": {
          "description": "The ZPLPrintJOb object to be processed. It includes the ZPL commands as well as the printer settings.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ZPLPrintJob"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ZPLPrintJob"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ZPLPrintJob"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns the rendering output for the specified ZPL commands and printer settings.",
            "content": {
              "image/png": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "image/jpeg": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "image/tiff": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "image/vnd.zbrush.pcx": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "application/vnd.zpl": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "application/vnd.epl": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "application/vnd.fingerprint": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "application/vnd.escpos": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "application/vnd.hp-pcl": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "image/png+json": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "image/jpeg+json": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "application/pdf+json": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "image/tiff+json": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "image/vnd.zbrush.pcx+json": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "application/vnd.zpl+json": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "application/vnd.epl+json": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "application/vnd.fingerprint+json": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "application/vnd.escpos+json": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "application/vnd.hp-pcl+json": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "image/png+zip": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "image/jpeg+zip": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "application/pdf+zip": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "image/tiff+zip": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "image/vnd.zbrush.pcx+zip": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "application/vnd.zpl+zip": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "application/vnd.epl+zip": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "application/vnd.fingerprint+zip": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "application/vnd.escpos+zip": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "application/vnd.hp-pcl+zip": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "application/json": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "500": {
            "description": "If an error occurs during the ZPLPrintJob object processing.",
            "content": {
              "image/png": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "image/jpeg": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/pdf": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "image/tiff": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "image/vnd.zbrush.pcx": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/vnd.zpl": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/vnd.epl": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/vnd.fingerprint": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/vnd.escpos": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/vnd.hp-pcl": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "image/png+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "image/jpeg+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/pdf+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "image/tiff+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "image/vnd.zbrush.pcx+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/vnd.zpl+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/vnd.epl+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/vnd.fingerprint+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/vnd.escpos+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/vnd.hp-pcl+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "image/png+zip": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "image/jpeg+zip": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/pdf+zip": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "image/tiff+zip": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "image/vnd.zbrush.pcx+zip": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/vnd.zpl+zip": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/vnd.epl+zip": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/vnd.fingerprint+zip": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/vnd.escpos+zip": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/vnd.hp-pcl+zip": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ProblemDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "detail": {
            "type": "string",
            "nullable": true
          },
          "instance": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": {}
      },
      "ZPLPrintJob": {
        "required": [
          "zplCommands"
        ],
        "type": "object",
        "properties": {
          "dpi": {
            "type": "integer",
            "description": "The printer resolution in DPI (Dots per inch) value. Valid values are: 152 (6 dpmm), 203 (8 dpmm), 300 (12 dpmm) or 600 (24 dpmm).",
            "format": "int32",
            "default": 203,
            "example": 203
          },
          "zplCommands": {
            "type": "string",
            "description": "The ZPL commands to be processed. The string containing the ZPL commands is converted to an array of bytes prior processing it. That conversion will use CodePage or Encoding 850 (Latin Character Set).",
            "example": "^XA^FO30,40^ADN,36,20^FDHello World^FS^FO30,80^BY4^B3N,,200^FD12345678^FS^XZ"
          },
          "zplCommandsCodePage": {
            "type": "integer",
            "description": "The Encoding or CodePage of the ZPL string content. Default is CodePage 850 (Latin Character Set). Valid CodePage numbers are listed here https://github.com/neodynamic/ZPL-Printer-Web-API-Docker/blob/master/README.md#supported-codepagesencodings",
            "format": "int32",
            "default": 850,
            "example": 850
          },
          "isZplCommandsBase64": {
            "type": "boolean",
            "description": "Whether the specified ZPL Commands string is in Base64 format. Useful for ZPL commands containing non-readable/printable chars. Default is false.",
            "default": false,
            "example": false
          },
          "renderOutputRotation": {
            "type": "integer",
            "description": "The rotation for the output rendering process. Default is 0 (None). Valid values are: 0 (None), 90 (Clockwise), 180, 270 (Clockwise).",
            "format": "int32",
            "example": 0
          },
          "antiAlias": {
            "type": "boolean",
            "description": "Whether anti-aliasing rendering is enabled. Default is true.",
            "default": true,
            "example": true
          },
          "labelWidthInchUnit": {
            "type": "number",
            "description": "The default label width in Inch units. Default is 4in.",
            "format": "float",
            "default": 4,
            "example": 4
          },
          "labelHeightInchUnit": {
            "type": "number",
            "description": "The default label height in Inch units. Default is 6in.",
            "format": "float",
            "default": 6,
            "example": 6
          },
          "labelBackColorHex": {
            "type": "string",
            "description": "The label's background color in hex notation. Default is #fff (White).",
            "nullable": true,
            "example": ""
          },
          "ribbonColorHex": {
            "type": "string",
            "description": "The label's ribbon color in hex notation. Default is #000 (Black).",
            "default": "",
            "nullable": true,
            "example": ""
          },
          "backgroundImageBase64": {
            "type": "string",
            "description": "The label's custom background image from a string in Base64 format. Image format mut be PNG or JPG.",
            "default": "",
            "nullable": true,
            "example": ""
          },
          "watermarkImageBase64": {
            "type": "string",
            "description": "Gets or sets the label's watermark image from a string in Base64 format. Image format mut be PNG or JPG.",
            "nullable": true,
            "example": ""
          },
          "watermarkOpacity": {
            "type": "integer",
            "description": "Gets or sets the label's watermark image opacity level. Values range from 0 to 100. Default is 50.",
            "format": "int32",
            "example": 50
          },
          "drawRFID": {
            "type": "boolean",
            "description": "Gets or sets whether a RFID image must be drawn on the label. The RFID will be drawn if any supported RFID commands are found in the label. Default is true.",
            "example": true
          },
          "thumbnailSizePixelUnit": {
            "type": "integer",
            "description": "The thumbnail size for the output rendering in Pixel unit. Default is 0 (zero) which means thumbnail generation is disabled.",
            "format": "int32",
            "default": 0,
            "example": 0
          },
          "pdfMetadataAuthor": {
            "type": "string",
            "description": "The PDF Metadata Author attribute.",
            "default": "",
            "nullable": true,
            "example": ""
          },
          "pdfMetadataCreator": {
            "type": "string",
            "description": "The PDF Metadata Creator attribute.",
            "default": "",
            "nullable": true,
            "example": ""
          },
          "pdfMetadataProducer": {
            "type": "string",
            "description": "The PDF Metadata Producer attribute.",
            "default": "",
            "nullable": true,
            "example": ""
          },
          "pdfMetadataSubject": {
            "type": "string",
            "description": "The PDF Metadata Subject attribute.",
            "default": "",
            "nullable": true,
            "example": ""
          },
          "pdfMetadataTitle": {
            "type": "string",
            "description": "The PDF Metadata Title attribute.",
            "default": "",
            "nullable": true,
            "example": ""
          },
          "forceLabelHeight": {
            "type": "boolean",
            "description": "Gets or sets whether the LabelHeight property value must override the ^LL command. Default is false.",
            "default": false,
            "example": false
          },
          "forceLabelWidth": {
            "type": "boolean",
            "description": "Gets or sets whether the LabelWidth property value must override the ^PW command. Default is false.",
            "default": false,
            "example": false
          },
          "invertColors": {
            "type": "boolean",
            "description": "Gets or sets whether to invert the colors of the output image. Default is false.",
            "default": false,
            "example": false
          },
          "compressionQuality": {
            "type": "integer",
            "description": "Gets or sets the compression quality level to use for the output image. Values range from 0 to 100.",
            "format": "int32",
            "default": 100,
            "example": 100
          },
          "traceRenderedElements": {
            "type": "boolean",
            "description": "Gets or sets whether to trace the ZPL elements rendered based on the ZPL commands to be processed. Only available for JSON output. Default is false.",
            "default": false,
            "example": false
          },
          "enableGraphicsCache": {
            "type": "boolean",
            "description": "Gets or sets whether the ^GF commands output rendering should be cached or not. Default is false.",
            "default": false,
            "example": false
          },
          "enablePrinting": {
            "type": "boolean",
            "description": "Gets or sets whether the output rendering should be formatted for printing scenarios. Default is false.",
            "default": false,
            "example": false
          },
          "enablePngCompression": {
            "type": "boolean",
            "description": "Gets or sets whether PNG compression is enabled. Default is true;",
            "default": true,
            "example": true
          },
          "renderOutputIndexes": {
            "type": "string",
            "description": "Gets or sets the list of indexes (as a comma separated list) which the rendered outputs must be filtered by. It must be a Zero-indexed list.",
            "default": "",
            "nullable": true,
            "example": "0,1,2"
          },
          "paperHeight": {
            "type": "number",
            "description": "Gets or sets the paper/page height in inches, used for output in PDF, TIFF and PCL format. \r\nWhen both paper​Width and paper​Height are greater than 0, the generated PDF, TIFF or PCL output uses the specified paper size instead of a page sized to the label, with the rendered label centered on each page.\r\nUse paper​Orientation to control whether the larger of these two values is used as the page width (Landscape) or page height (Portrait).\r\nDefault is 0.",
            "format": "float",
            "default": 0,
            "example": 0
          },
          "paperWidth": {
            "type": "number",
            "description": "Gets or sets the paper/page width in inches, used for output in PDF, TIFF and PCL format. \r\nWhen both paper​Width and paper​Height are greater than 0, the generated PDF, TIFF or PCL output uses the specified paper size instead of a page sized to the label, with the rendered label centered on each page.\r\nUse paper​Orientation to control whether the larger of these two values is used as the page width (Landscape) or page height (Portrait).\r\nDefault is 0.",
            "format": "float",
            "default": 0,
            "example": 0
          },
          "paperOrientation": {
            "enum": [
              "Portrait",
              "Landscape"
            ],
            "type": "string",
            "description": "Gets or sets the orientation applied to paper​Width and paper​Height when computing the fixed page size for output in PDF, TIFF and PCL format. Default is Portrait.",
            "default": "Portrait",
            "example": "Portrait"
          },
          "pclCompression": {
            "type": "boolean",
            "description": "Gets or sets whether the output PCL must be compressed. Default is False.",
            "default": false,
            "example": false
          },
          "pclMonochrome": {
            "type": "boolean",
            "description": "Gets or sets whether the output PCL must be monochrome. Default is False.",
            "default": false,
            "example": false
          },
          "tiffCompression": {
            "enum": [
              "None",
              "CCITTG4",
              "Deflate",
              "PackBits"
            ],
            "type": "string",
            "description": "Gets or sets the TIFF compression. Default is None.",
            "default": "None",
            "example": "None"
          },
          "tiffPixelFormat": {
            "enum": [
              "Bilevel",
              "Grayscale8",
              "Rgb24",
              "Rgba32"
            ],
            "type": "string",
            "description": "Gets or sets the TIFF pixel format. Default is Bilevel.",
            "default": "Bilevel",
            "example": "Bilevel"
          }
        },
        "additionalProperties": false,
        "description": "It specifies a ZPL Print Job including the ZPL commands to be processed and the printer settings."
      }
    }
  }
}