Printer 'Syntax Error'

Issues related to label design (working with databases, data processing, RFID encoding etc.) and printing (from NiceLabel Express, NiceLabel Pro, NiceForm and NicePrint)

Moderators: Georges, milos, NiceLabel Support Team

Post Reply
HaydnWVN
Enthusiast
Posts: 19
Joined: Mon Jul 02, 2018 1:51 pm

Printer 'Syntax Error'

Post by HaydnWVN » Thu May 30, 2019 4:16 pm

Hi
  1. Automation setup to trigger from file in folder with Structured Text, trigger contains printer to use and label layout to use with variables from file.
  2. .csv file dropped in folder
  3. Automation triggers
  4. Print spooler shows jobs
  5. One by one print jobs are deleted from queue, very quickly
  6. Nothing prints, no errors in Automation log, no error on printer
  7. Printer's web interface shows 'Syntax Error' under Printer status
Trigger Folder:Image

Trigger Actions:Image

With the printer paused I'm able to check it has used the correct layouts and produced 2 label jobs for each line: Image

When unpaused their status show Printing, then Deleting in less than 1s (too fast to capture): Image

Printer status from web interface: Image

Printing my label templates directly from Nicelabel works (but obviously no variable data). Automation Preview shows correct data when pointed at the same trigger file. No errors in Automation log, everything is Info and as I'd expect.

Is this because I'm attempting to print 2 labels per line from my trigger or something else?

Anywhere else I can look (Windows) to find exactly what this Syntax error is? I see the same on Windows Server 2016 and Windows 10 x64 using this same automation.

I have various other Automation's setup and running from the same server, using different triggers and different printers. This is the first time I've tried to trigger 2 prints from 1 line in a file.

User avatar
Mytch
NiceLabel Support
NiceLabel Support
Posts: 43
Joined: Fri Jul 13, 2018 10:26 pm
Location: Milwaukee, Wisconsin
Contact:

Re: Printer 'Syntax Error'

Post by Mytch » Thu May 30, 2019 5:50 pm

HaydnWVN,

When an Automation Trigger is deployed to Automation Manager, NiceLabel is now running as a service instead of an application (inheriting user permissions). We recommend changing the "Log on as" user for NiceLabel Automation Service 2019 (or 2017). Currently, it is set for Local System, which likely is not having proper permissions to network resources. Please be sure that the new user account has proper access to any file locations and configured with proper access in each printer's Printer Properties > Security settings.

Please let us know if this issue still persists after updating the Automation Service account.

Regards,
Mytch

HaydnWVN
Enthusiast
Posts: 19
Joined: Mon Jul 02, 2018 1:51 pm

Re: Printer 'Syntax Error'

Post by HaydnWVN » Thu May 30, 2019 6:13 pm

Hi Mytch

Many thanks for the input - I have various other automations running with file locations very similar without issue, but will do as you suggest and report back tomorrow. Thanks!

HaydnWVN
Enthusiast
Posts: 19
Joined: Mon Jul 02, 2018 1:51 pm

Re: Printer 'Syntax Error'

Post by HaydnWVN » Fri May 31, 2019 11:33 am

Hi

Ok so checked the service logon, seems to already be set as a service and not local:
Image

Checked printer securities, all of mine are set the same (printers which work and this one which doesn't:
Image

To rule out the printer, I switched it's IP to a known good and ran a different automation through it successfully.

Here is a video of the printer queue being filled, then deleting its jobs: https://youtu.be/cECMr0_yEIc

Am now also logging this with NiceLabel Support to troubleshoot.

User avatar
Mytch
NiceLabel Support
NiceLabel Support
Posts: 43
Joined: Fri Jul 13, 2018 10:26 pm
Location: Milwaukee, Wisconsin
Contact:

Re: Printer 'Syntax Error'

Post by Mytch » Fri May 31, 2019 6:53 pm

HaydnWVN,

Based on the original screenshots, the print jobs in the queue were sent from Local System (SYSTEM), yet the latest screenshots are now showing a new service owner. Are these screenshots from different systems or was the account just updated? Is nicelabel.service part of the Administrators group?Nonetheless, it seems the same issue is persisting with the printer giving a "syntax error" and deleting jobs from the queue. This may be more-so related with the driver configuration than the Automation configuration.

Opening a Support case will be your best path for resolution, as a technician will have to investigate differences in working and non-working environments.

Regards,
Mytch

HaydnWVN
Enthusiast
Posts: 19
Joined: Mon Jul 02, 2018 1:51 pm

Re: Printer 'Syntax Error'

Post by HaydnWVN » Thu Jun 06, 2019 10:42 am

So it sounds like security for the nicelabel automation service was partly to blame, adding the specific account (NiceLabel.Service) and giving it all Manage permissions/control stopped the print jobs from being deleted from the spooler.

I'd also (for various other reasons) been using a 2019 Bartender driver for this model of printer, switching to the NiceLabel driver has solved the printer reporting 'Syntax Error' and failing to print. I figure something different in this label design than others which we didn't see the same error.

I'm still seeing some odd behaviour where print jobs 'self delete' from the spooler and others where Automation reports a Processed job, yet nothing appears in spooler/on printer. These might be more linked to label design and specifying a printer in the design causing a knock on - as I'm specifying a Printer within Automation which may not be the same as the one in the Label Template. Redesigning my label with the correct printer specified seems to have solved. Although this is very annoying - means I have the same label designed for different printers for different automations to use to get the same output.

I've also seen that using 'Text Fit' on a Text Box with variable content cause an issue on the Toshiba TEC B-EV4T printer. I'm using it on other labels printed to Toshiba TEC's without issue. With it enabled and automation running 2 actions to print 2 different labels per line, the sequence of labels would be muddled and some would lose all formatting/font adjustment. With it disabled (using multiline output to split long variables) the printing label sequence is correct over both labels, as well as the design formatting.

Amongst this I'd also seen these particular Thermal transmissive printers 'reset' back to Direct Thermal, causing more problems. I've found if enabling 'Use default printer settings from the printer driver' under the Label Template Document Properties has stopped this from happening. Unsure if that is also related to the NiceLabel.Service account not having all permissions or not.

Unsure how many of these are issues related to using NiceLabel 2017 and are resolved in 2019. Many thanks to Lucien on Support who's pointed me the right direction several times!

User avatar
Mytch
NiceLabel Support
NiceLabel Support
Posts: 43
Joined: Fri Jul 13, 2018 10:26 pm
Location: Milwaukee, Wisconsin
Contact:

Re: Printer 'Syntax Error'

Post by Mytch » Thu Jun 06, 2019 10:09 pm

HaydnWV,

So it sounds like security for the nicelabel automation service was partly to blame, adding the specific account (NiceLabel.Service) and giving it all Manage permissions/control stopped the print jobs from being deleted from the spooler.
  • Deployed Automation triggers inherit permissions of the Automation Service owner - this is standard functionality of NiceLabel Automation.
I'd also (for various other reasons) been using a 2019 Bartender driver for this model of printer, switching to the NiceLabel driver has solved the printer reporting 'Syntax Error' and failing to print. I figure something different in this label design than others which we didn't see the same error.
  • We always recommend installing the latest NiceLabel driver. Likely, turning off the "advanced printer interface" would resolve issues printing to the non-NiceLabel driver
I'm still seeing some odd behaviour where print jobs 'self delete' from the spooler and others where Automation reports a Processed job, yet nothing appears in spooler/on printer. These might be more linked to label design and specifying a printer in the design causing a knock on - as I'm specifying a Printer within Automation which may not be the same as the one in the Label Template. Redesigning my label with the correct printer specified seems to have solved. Although this is very annoying - means I have the same label designed for different printers for different automations to use to get the same output.
  • Perhaps you do not have a "Set Printer" action configured in the Automation trigger. In this case, only the printer name defined in the label is used. This could also be caused by printing preferences saved in the label if the option "use printer settings saved in the label" is configured with printer settings that are not recognized by the target printer.
I've also seen that using 'Text Fit' on a Text Box with variable content cause an issue on the Toshiba TEC B-EV4T printer. I'm using it on other labels printed to Toshiba TEC's without issue. With it enabled and automation running 2 actions to print 2 different labels per line, the sequence of labels would be muddled and some would lose all formatting/font adjustment. With it disabled (using multiline output to split long variables) the printing label sequence is correct over both labels, as well as the design formatting.
  • We would need more information about what Text Fix options have been enabled and what contents are being populated
Amongst this I'd also seen these particular Thermal transmissive printers 'reset' back to Direct Thermal, causing more problems. I've found if enabling 'Use default printer settings from the printer driver' under the Label Template Document Properties has stopped this from happening. Unsure if that is also related to the NiceLabel.Service account not having all permissions or not.
  • This is probably caused by using the option "use printer settings saved in the label". In Printer Properties, please be sure that the print mode is not set for Direct Thermal
Unsure how many of these are issues related to using NiceLabel 2017 and are resolved in 2019. Many thanks to Lucien on Support who's pointed me the right direction several times!
  • Go Lucien from EMEA Support! :)

HaydnWVN
Enthusiast
Posts: 19
Joined: Mon Jul 02, 2018 1:51 pm

Re: Printer 'Syntax Error'

Post by HaydnWVN » Wed Jun 12, 2019 1:21 pm

Hi Mytch

Firstly, many thanks for the reply and input. Much of it I feel I now either understand or at least have solutions/workarounds in place to get the output we require. But I'll flesh out a couple of points here as they may help others.
Mytch wrote:
Thu Jun 06, 2019 10:09 pm
  • Perhaps you do not have a "Set Printer" action configured in the Automation trigger. In this case, only the printer name defined in the label is used. This could also be caused by printing preferences saved in the label if the option "use printer settings saved in the label" is configured with printer settings that are not recognized by the target printer.
  • We would need more information about what Text Fix options have been enabled and what contents are being populated
Screengrab of my Actions:
Image

In this particular scenario my input file has all the required information for two labels per line. The output we require are a 'front' and 'rear' labels printed on the same media in sequence. I did originally try a label design which covered over two labels but with a variable size on one of the fields on the first label (determined by variable length) it made the second label 'untidy' without things lining up consistently between comparable labels.

The above with using two separate label template designs populated from one source line works well. But I had to stop using the variable size ('Text Fit' under Style of a Text Box with a Variable source) as whenever I had it enabled it 'broke' my outputs in way I mentioned (loss of formatting/label layout and missing prints). I'm unsure if that is a problem with this specific TEC printer or the driver I'm using. Ran out of time to troubleshoot it.
Mytch wrote:
Thu Jun 06, 2019 10:09 pm
  • This is probably caused by using the option "use printer settings saved in the label". In Printer Properties, please be sure that the print mode is not set for Direct Thermal
Entirely possible. At that point I'd gone through so many automations/label layouts and printer driver changes to troubleshoot that I possibly had this set by mistake on a label design (think it is the default?). Since then I have been using the 'Use default printer settings from the printer driver' option and not seen the problem again.

Part of the reasoning for switching to this is we're designing labels on 3 different PC's, saving them into a single folder on a fileserver, then automation running on another server loads the required label template from a variable in the output file which also has the variables data. It just made things simpler so the automation printer is always using the required settings for the printer in question, not the one used in design of the label template.

Once I had the base structure in place, tested and functioning we've rapidly expanded things. I now have 9 'Live' automations setup, checking 4 different folders for various file triggers. I have 2 users (+ myself) designing labels (over 150 already). Printing to 12 different printers on 4 different sites, 8 of them determined by variables in the output files used as triggers. Trying to keep things as structured as possible, to hopefully help troubleshooting and any future understanding - I really need to get my documentation/instructions up to date before things get any more complex! :shock: :lol:

Post Reply