Skip to main content
Version: Next

BarTender Agent

1. Overview​

  • BarTender Agent is a BarTender Web printing service running as a Windows Service on Windows systems. Users can print BarTender documents through Print Agent from any computer connected to the Internet.
  • BarTender Agent provides remote printing services (e.g., BarTender and LMES are not on the same computer, LMES needs to connect to BarTender Agent remotely via http to execute remote printing).

2. Installation

  • Print Agent is included as an optional component in the LMES installation package and will not be installed automatically.
  • Print Agent needs to be installed on the same server as BarTender. Print Agent calls the local BarTender application to execute printing tasks.
  • You can download the installation package on the LMES system configuration page, or find the installation package in the CMS directory to install $(CMSRootPath)\host\wwwroot\BarTender.Agent.exe.
  • Double-click the BarTender.Agent.exe installation package to start the installation wizard, and complete the remaining steps in the wizard.
  • After installing Print Agent, you can enter BarTender.Agent in Windows system services, find the corresponding service, and confirm whether it is in the "Running" state.

3. Interface Documentation

Base URLs: http://127.0.0.1:18500

3.1 GET Get Templates​

GET /api/templates

Request Parameters​

NamePositionTypeRequiredDescription
templateDirectoryquerystringNoTemplate directory

Response Example

200 Response

["string"]

Return Result​

Status CodeStatus Code MeaningDescriptionData Model
200OKSuccessInline

Return Data Structure​

3.2 GET Preview Template​

GET /api/preview

Request Parameters​

NamePositionTypeRequiredDescription
templatePathquerystringNoTemplate file

Response Example

200 Response

{}

Return Result​

Status CodeStatus Code MeaningDescriptionData Model
200OKSuccessInline

Return Data Structure​

3.3 POST Check Connection​

POST /api/check

Request Parameters​

NamePositionTypeRequiredDescription
printNamequerystringNoPrinter name

Response Example

200 Response

{"noProblem":true,"errorMsg":"string"}

Return Result​

Status CodeStatus Code MeaningDescriptionData Model
200OKSuccessCMS.Plugin.MesSuite.Printer.PrintResult

3.4 POST Print Document​

POST /api/print

Body Request Parameters

{
"printJobName": "string",
"printerName": "string",
"printTemplate": "string",
"printNumber": 0,
"numberSerializedLabels": 0,
"printData": {
"property1": "string",
"property2": "string"
}
}

Request Parameters​

NamePositionTypeRequiredDescription
bodybodyCMS.Plugin.MesSuite.Printer.PrintOptionsNonone

Response Example

200 Response

{"noProblem":true,"errorMsg":"string"}

Return Result​

Status CodeStatus Code MeaningDescriptionData Model
200OKSuccessCMS.Plugin.MesSuite.Printer.PrintResult

Data Model

CMS.Plugin.MesSuite.Printer.PrintOptions​

{
"printJobName": "string",
"printerName": "string",
"printTemplate": "string",
"printNumber": 0,
"numberSerializedLabels": 0,
"printData": {
"property1": "string",
"property2": "string"
}
}

Properties​

NameTypeRequiredConstraintsChinese NameDescription
printJobNamestring¦nullfalsenonePrint job name
printerNamestring¦nullfalsenonePrinter name
printTemplatestring¦nullfalsenoneTemplate path
printNumberinteger(int32)falsenoneNumber of copies
numberSerializedLabelsinteger(int32)falsenonePrint serialized labels according to this quantity
printDataobject¦nullfalsenonePrint data source
» additionalPropertiesstringfalsenonenone

CMS.Plugin.MesSuite.Printer.PrintResult​

{
"noProblem": true,
"errorMsg": "string"
}

Properties​

NameTypeRequiredConstraintsChinese NameDescription
noProblembooleanfalsenonenone
errorMsgstring¦nullfalsenonenone