Controlling Printer with Python Script

Software technical issues not related to any of the other categories

Moderators: Georges, milos, NiceLabel Support Team

Post Reply
babis95
Enthusiast
Posts: 13
Joined: Fri Feb 08, 2019 6:56 pm

Controlling Printer with Python Script

Post by babis95 » Tue May 14, 2019 6:00 pm

Hi,

Does anybody know of a way where I could use python to control the printer.
What I'm mostly after is to stop the printer every time a data (size) changes, and print new size as a different job. We do this manually now by selecting the size we want to print and hitting the print button after which we de-select that size, select the other one and print this until all sizes are done.

User avatar
Kyleodonnell
NiceLabel Support
NiceLabel Support
Posts: 310
Joined: Mon Aug 28, 2017 3:07 pm

Re: Controlling Printer with Python Script

Post by Kyleodonnell » Wed May 15, 2019 3:08 pm

Babis95,

are you able to elaborate on this statement
"What I'm mostly after is to stop the printer every time a data (size) changes, and print new size as a different job"

Are you referring to when the data itself changes size? or if the label stock needs to change size?

babis95
Enthusiast
Posts: 13
Joined: Fri Feb 08, 2019 6:56 pm

Re: Controlling Printer with Python Script

Post by babis95 » Wed May 15, 2019 5:01 pm

We are printing Clothes Wash cares - that go on a roll straight from our printer (CAB Printer). NiceLabel is connected to an excel spreadsheet with a filter that searches for a specific order in that spreadsheet. Each order is composed of multiple sizes. Every time new order is searched for we switch tabs in our print form from Variables to the spreadsheet (https://imgur.com/a/0HJllZP). Each record displayed in this image (7 records) are different sizes. Because we print one order (all records) we require to have a gap of sorts when a size changes. This can only be accomplished when each of the sizes is printed separately as a single print job sent to the printer. (We unchecked all sizes except the one we want print (https://imgur.com/a/NeSbOdp), and hit print, then unchecked that size, select different one, hit print - and repeat this process for all sizes.

I tried using the batch print option, where every time size variable changes a tail label gets printed. But this does not seem to work well with out printers as it prints the tail label on top of the next size label, as well as messes up the artworks positioning (variables) and prints them in wrong locations.

User avatar
Kyleodonnell
NiceLabel Support
NiceLabel Support
Posts: 310
Joined: Mon Aug 28, 2017 3:07 pm

Re: Controlling Printer with Python Script

Post by Kyleodonnell » Wed May 15, 2019 5:44 pm

Babis95,

batch printing would be the workaround and using a tail label. We would recommend using powerforms, which would allow you to configure a print action that could send a "blank" label down or a custom label that would be the separator between each run of jobs. You can contact sales.americas@nicelabel.com to talk about powerforms. If you have other technical questions, you can contact support at Support.americas@nicelabel.com

Post Reply