0

I am not sure how much support there is for powerbuilder these days, since it seems hardly anybody is using it anymore, but if any community is going to come through it is this one..

Anyway, I am looking to print some labels using zpl code, not really sure where to begin, since I've never done this, I've always just used PB to create simple bar code labels, but it seems limited in the formatting and alignment department.

1) I have the zpl code, but I don't know how I would send it to the printer from my PB application.

2) I'm not sure how to pass values from the database to the zpl label from one of my tables.

If anybody can shed some light on these topics it would be greatly appreciated..

Thanks all!

Sergio B
  • 734
  • 1
  • 5
  • 17

2 Answers2

0

My guess is you will need to write a .Net control which handles the communication between PB and zpl. Here is another post with some information which may be of use to you: Print preview ZPL II commands using .NET WinForm before sending it to Zebra printer

Community
  • 1
  • 1
Matt Balent
  • 2,337
  • 2
  • 20
  • 23
0
  1. You will have to send the ZPL commands to the printer bypassing the driver. You can :

    • use the passthrough option of the printer driver
    • use the win32 api to talk directly to the printer
    • send the label to the ftp server of the printer

    You wont find many answers in Powerbuilder but you can look for similar questions in other programming languages (dotNet,VB...) for example : Send raw ZPL to Zebra printer via USB

  2. First debug your label using fixed text, then replace the variant parts of the label with some tokens (eg. $PARTNUMBER) and in your database records iteration do a string replace of the tokens by the actual value.

Community
  • 1
  • 1
jva
  • 31
  • 1
  • 2
  • 7