1. Dave O'BILOG
  2. PowerBuilder
  3. Tuesday, 12 February 2019 11:07 AM UTC


hi ,

it's possible to generate datamatrix in powerbuilder 17/18/19 without an OCX ?


Accepted Answer
Brad Mettee Accepted Answer Pending Moderation
  1. Tuesday, 12 February 2019 14:28 PM UTC
  2. PowerBuilder
  3. # Permalink

There's no built in way to generate a Data Matrix barcode. You'll need an external encoder object of some type (a DLL with direct calls, or an OLE Automation object), and possibly installation of font files.

ID Automation sells a Data Matrix product that will fit what you need, but it's not cheap. A set of fonts gets installed on the machine, use one of them on a text field (appropriately sized height/width), call the encoder to turn your data into a string for the new field, and the font makes it look like a data matrix barcode. We've been doing something similar with a their universal barcode package for 10+ years.

Generating a Data Matrix barcode directly in Powerbuilder script *might* be possible. I'm looking at some C code that's 1300 lines long, but translating it would be more time consuming, and therefor expensive, than using a pre-packaged product that comes with support. It would also be a lot slower than a packaged, external, DLL.

Are there restrictions on what you can install on machines? Is this for web, mobile or desktop?

There are no comments made yet.
Mark Goldsmith Accepted Answer Pending Moderation
  1. Monday, 1 November 2021 19:57 PM UTC
  2. PowerBuilder
  3. # 1

Hi Dave,

Just a follow-up to Brad's reply, you may wish to have a look at these two recent posts:


Miguel created some source code that may work well as a starting point for you. It utilizes the ZXING library, located here: https://github.com/zxing/zxing. Once on that page scroll down and you'll see that Data Matrix is one of the supported bar codes.



  1. Miguel Leeuwe
  2. Monday, 1 November 2021 20:12 PM UTC
That would be FREE and should be very easy to implement, even for a noob like me.

I don't think my code needs a lot of changes. When I have some time, (absolutely NOT the case right now), I'll try to expand that code for different barcode formats.


  1. Helpful
There are no comments made yet.
Richard Keller Accepted Answer Pending Moderation
  1. Monday, 1 November 2021 18:47 PM UTC
  2. PowerBuilder
  3. # 2

Are you able to use this in a Datawindow as a Font if you encode the binary string?

There are no comments made yet.
  • Page :
  • 1

There are no replies made for this question yet.
However, you are not allowed to reply to this question.