Skip to main content

Setting up new printer

To setup a new printer, the ERP Printer application is required.

For

 first-First-time setup,

For first-time setup, try to find the "ERP Printer Software" options in the "options" table. This options should have the software saved in its file manager.

If you can't find the option or its file manager is empty, you will have to contact Web team for assistance with acquiring ERP Printer application and setting up of the application ERP authentication.

First-time setup also requires the creation a "Printer User", that the ERP Printer application will use to listen for printing jobs.

This user's credentials are needed in printer software's setup, so it has to be created beforehand. The user also requires the "join-printers-presence-channel" permission.

 

Add a new printer in ERP

The first thing to do is to create a new printer entry invia the "printers" table create form.. 

OnceAfter the printer has been created, copy its "secret", it will be required for ERP Printer applicationsoftware issetup.

acquired

 and

authenticationERP setupPrinter is finished,Setup setting up new printers can skip this step.

Connect the physical printer to the computer, where it will be located and perform the printersactual printer's setup, including installing correct drivers... 

Open the "ERP Printer software" option and its file manager. The printer'file manager should contain 3 separate operating-system-named archives. Download the archive for your computer's operating system and extract it to a "safe" location.

Safe location - a folder on your computer that won't be deleted or moved.

image.png

Windows

Open the extracted folder and start the "ERP Printer Setup" program. This will needopen (ata least)windows Pythonand 3prompt installedyou to enter credentials , that will be used to authenticate the application with your ERP.

The entered credentials are saved into the "Windows credentials manager" and read from there during application runtime.

    Client ID
      The ID of authentication client, that will be used to authenticate the application. Client secret
        The corresponding authentication client's secret. User email
          The email of Printer User, which allows the printer application to listen for printing jobs. User password
            The password for the ERPPrinter PrinterUser account.

            Once the credentials have been entered, the application will create a shortcut for the printer on your menu and add it to work.the computer's startup list.

              After

              Locatecompleting the setup, open the .env file and add the missing information. It should contain at least the following data.
              # Run as a background service
              RUN_AS_BACKGROUND_SERVICE=true
              
              # ERP's API URL
              ERP_API_URL=
              
              # Printers secret from ERP
              ERP_PRINTER_SECRET=
              
              # Auto-select a printer by name instead of being prompted.
              PRINTER_NAME=

              Once all this information has been defined, you can perform a test run by opening the "ERP Printer" applicationfile. If all information has been correctly entered, you should get the following notification:

              Printer 'Your-selected-printer' connected to ERP as 'Your-Printer-Name-In-ERP'. Waiting for trigger.

              You can now attempt to print a document from the ERP to your selected printer.

               

              Linux

              Open the extracted folder and open it.the There.env file. Fill in the necessary credentials, which will be used to authenticate and connect the printer application with your ERP.

              Your .env file should behave all of these filled out:

              # Run as a background service
              RUN_AS_BACKGROUND_SERVICE=true
              
              # Printer User credentials
              ERP_USERNAME=
              ERP_PASSWORD=
              
              # Authentication client credentials
              ERP_CLIENT_ID=
              ERP_CLIENT_SECRET=
              
              # ERP's API URL
              ERP_API_URL=
              
              # Printers secret in ERP
              ERP_PRINTER_SECRET=
              
              # Auto-select a printer by name instead of being prompted.
              PRINTER_NAME=

              Once the authentication 3information fileshas inbeen directory:entered,

                A "main" software file A PDFtoPrinter program The environment file. If it does not exist, create a new file named, ".env"

                image.png

                Opensave the environment.env file and copy into itstart the generated "secret"ERP Printer" ofapplication. After a successful connection to the newERP, printer,a whichnotification waswill created earlier. The contents of the file should be:appear:

                ERP_PRINTER_SECRET=your-new-printer-secret-goes-here

                Printer 'Your-selected-printer' connected to ERP as 'Your-Printer-Name-In-ERP'. Waiting for trigger.

                After that, you can close the environmentterminal.

                file

                If you want to setup run-on-startup, this has beento created/updated,be startdone manually via the "main"operating printersystem software.tools.

                After 

                Mac

                The Mac install process is the commandsame lineas window opens, a list of available registered printers will be show.Linux.

                Screenshot_1.png

                 

                Make sure that your new printer is listed, otherwise troubleshooting of drivers will be required.

                Once you find your printer on the list, enter its corresponding number (e.g. 0) when prompted. This will select the printer (e.g. Showroom) and connect to it. A successful connection attempt will generate a "Websocket connected" response, like on the image below.

                Screenshot_2.png

                Printer Label Setup

                When the printer software - ERP connection is established, the printer's use can be defined in the options table, in the "printer_buttons" option. Configure the new printer (for labels or normal prints) in the "data" field.

                {
                  "printProductLabel": {
                    "title": "Printer desno",
                    "layout": "no-margin-label-printer",
                    "template": "label",
                    "printer_id": 1,
                    "background-color": "#FFFF00"
                  }
                }

                 

                Additional

                One started, the printing software will always prompt you to select a printer, to which it should connect and send printing jobs.

                image.png

                You can edit the environment file so that the "Available printers" selection gets skipped and a select printer is chosen automatically.  toTo do this, copy the printer's name from the list and add it in the following line intoin the environment file(.env) andfile, then save it.

                PRINTER_NAME="printer name"

                If restarted, the mainERP Printer program shouldwill now automatically select the pre-configuredselected printer and attempt connection to the ERP.printer.