Question

Label Printing and Device Hub with Acumatica

  • 20 February 2024
  • 8 replies
  • 114 views

Userlevel 2
Badge

From what I can tell there are two types of printing to Device Hub with Acumatica: 

  1. The type that filters a report using a Dictionary and sends it to Device Hub 

and

  1. the type that you build a ZPL low level printer file for say labels pasting data in with commands, then you send that to the printer. 

From everything I have read, the second method is the way to print custom labels.  The first method seems to be used when you are printing a report not labels (but sometimes I see one off labels printed this way).  Not for printing labels en mass.  For printing labels in general the ZPL file with the printer in raw mode in Device Hub is the way to go.  

Am I off base here or not? 

As I side note a requirement here is to be able to rotate labels and I know the only way to do that is ZPL. 

Thanks in advance

 


8 replies

Badge +11

As you say, both are valid. I've really only ever done the first, but it's always fit my use case.

Userlevel 2
Badge

So you didn’t have any scaling issue? or wonky behavior?   Just curious you do more than 1 label at a time with that method? 

Userlevel 2
Badge

And of course thanks Daryl.

Badge +11

I guess I'm not quite sure what you mean by that. The action sends the labels one at a time, but I do use the action to mass process many labels in a short time.

Userlevel 2
Badge

I’m referencing behavior we have seen when printing labels directly in Acumatica.  when you go to print preview the labels seem to jump off the page (too big) but you change scaling properties and it all aligns.  Having to do that every time we print. 

I know what you mean by doing one at a time but en mass (like a process screen calling the button on a form) 

I do appreciate the input.  

Badge +11

Maybe the difference is that I’m not previewing the labels. It’s wired directly into an action that simply sends it to the printer. It’s not the same as printing a “label” report which would be previewed, etc.

Userlevel 6
Badge +4

I had a need to print custom labels several years ago via Device Hub and wrote a blog post about it.  Printing to a Label Printer via Device Hub – Brian's Blog (acumatica.dev)  Also, you might look into Asgard Labels on the marketplace if you want a fancy solution that uses an alternative to Device Hub.

I chose the route of creating a custom label configuration screen and a set of tools to build various labels for our specific needs.  I can generate for EPL and ZPL languages spending on whether we are printing to our old Eltron printers or newer Zebra printers.  The blog post explains how to get the generated EPL or ZPL control file into Acumatica and sent to the Device Hub printer of your choice.

In 23r1, there was a minor change that I really need to document on my blog post or write a new post for the updated code.  Instead of PXGraph.CreateInstance<SMPrintJobMaint>() as noted in the blog post, you want to use the StartAsyncOperation version shown below starting with 23r1.

SMPrintJobMaint graph = PXGraph.CreateInstance<SMPrintJobMaint>();
graph.LongOperationManager.StartAsyncOperation(ct =>
graph.CreatePrintJob(printSettings, (string)null, parameters, description, ct));

 

Userlevel 2
Badge

Hey Brian, I read your blog, brilliant and what is guiding me mostly. 

And Daryl I have a label right now, pretty simple but when I print from the reports menu, it prints no issue.  But when I do the old run the report, send dictionary to filter report and send it to device hub the entire label is pushed down an inch and prints weird.  Wonky behavior like that is what I am finding when I don’t take control of the printer, which is what I think is necessary here.  

I think we are going with Asgard in this case, but I still need a simple for solution for one off label print jobs.  I think the ZPL code is the way to go.  Thanks everyone for input.

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved