BARCODER - Create 1D and 2D Barcodes (QRCode , C39,etc)

Post your working scripts, libraries and tools for AHK v1.1 and older
User avatar
Gio
Posts: 1247
Joined: 30 Sep 2013, 10:54
Location: Brazil

Re: BARCODER - Create 1D and 2D Barcodes (QRCode , C39,etc)

19 Feb 2016, 12:42

Interesting. So if you keep it at 96 DPI than an A4 page would be roughly 794x1123 pixels instead of 2100x2970 right? That means we might aswell change the full canvas to that size to get it to fit an A4. I did not knew DPI info was stored as metadata in the bitmap structure though, thanks for pointing it out.

The r4 option is explained in Tics tutorial on GDIP text messages. r4 stands for using anti-aliasing as a rendering method for the text message in Gdip_TextToGraphics(). Other possible values:
; The rendering hint (the quality of the antialiasing of the text) can be specified with r, whose values may be:
; SystemDefault = 0
; SingleBitPerPixelGridFit = 1
; SingleBitPerPixel = 2
; AntiAliasGridFit = 3
; AntiAlias = 4
User avatar
JoeWinograd
Posts: 2177
Joined: 10 Feb 2014, 20:00
Location: U.S. Central Time Zone

Re: BARCODER - Create 1D and 2D Barcodes (QRCode , C39,etc)

19 Feb 2016, 13:13

Let's do the math. A4 is 210x297mm. One inch is 25.4mm, so A4 is 8.2677x11.6929inch. At 96 DPI, that makes an A4 794x1123 pixels — you are correct! But I prefer keeping the image at 300 DPI, as I'm guessing that the QR Code readers will perform better on a 300 DPI image than a 96 DPI one.

Thanks for the explanation of the r param, as well as the link to the tutorial. Regards, Joe
User avatar
JoeWinograd
Posts: 2177
Joined: 10 Feb 2014, 20:00
Location: U.S. Central Time Zone

Re: BARCODER - Create 1D and 2D Barcodes (QRCode , C39,etc)

31 May 2016, 14:51

Hi Gio,
I'm wondering if you can add the ability to create Code128 bar codes. Thanks, Joe
User avatar
Gio
Posts: 1247
Joined: 30 Sep 2013, 10:54
Location: Brazil

Re: BARCODER - Create 1D and 2D Barcodes (QRCode , C39,etc)

31 May 2016, 17:55

Hey Joe.

I've added it to a new to do list. Not sure when i will have time to do it though, since i'm quite busy these days. Is it for a special case where CODE39 and ITF won't suffice?

Best wishes.
User avatar
JoeWinograd
Posts: 2177
Joined: 10 Feb 2014, 20:00
Location: U.S. Central Time Zone

Re: BARCODER - Create 1D and 2D Barcodes (QRCode , C39,etc)

31 May 2016, 18:20

Is it for a special case where CODE39 and ITF won't suffice?
Yes, exactly. Code39 provides only these symbols:

$ % + - . / space

And ITF doesn't allow any symbols (or even upper case letters — just digits). I need some symbols that 128 allows, but 39 and ITF don't. However, it's not an urgent requirement. I can make do for now with the six symbols (and space) that 39 provides, so I appreciate that you put it on your new to do list. But timing is not critical, so whenever you have the time to do it will be fine. Thanks very much, Joe
User avatar
AlphaBravo
Posts: 586
Joined: 29 Sep 2013, 22:59

Re: BARCODER - Create 1D and 2D Barcodes (QRCode , C39,etc)

20 Jun 2016, 14:50

Code 128
Works for visible characters only, no special characters and FNC 1–4
Spoiler
Last edited by AlphaBravo on 23 Jun 2016, 12:28, edited 3 times in total.
User avatar
Gio
Posts: 1247
Joined: 30 Sep 2013, 10:54
Location: Brazil

Re: BARCODER - Create 1D and 2D Barcodes (QRCode , C39,etc)

20 Jun 2016, 15:25

Awesome, thanks for sharing it Alpha Bravo, this will certainly help many people :thumbup:

A small question before i add it to the main script:
I have tested it out and it created many working barcodes, but i was unable to decode the barcode i have created for the string "EXAMPLER APPLE". I'll attach the image. Can you please test it?

Best wishes.
EXAMPLER APPLE.png
EXAMPLER APPLE.png (1.25 KiB) Viewed 8551 times
User avatar
AlphaBravo
Posts: 586
Joined: 29 Sep 2013, 22:59

Re: BARCODER - Create 1D and 2D Barcodes (QRCode , C39,etc)

21 Jun 2016, 11:16

@Gio, you're right, check code is different even though it works for most cases, will investigate.
User avatar
AlphaBravo
Posts: 586
Joined: 29 Sep 2013, 22:59

Re: BARCODER - Create 1D and 2D Barcodes (QRCode , C39,etc)

21 Jun 2016, 16:19

@Gio, OK, it was a little more complicated than I originally thought, updated code above.
User avatar
Gio
Posts: 1247
Joined: 30 Sep 2013, 10:54
Location: Brazil

Re: BARCODER - Create 1D and 2D Barcodes (QRCode , C39,etc)

23 Jun 2016, 10:24

Excellent, thanks AlphaBravo! :)


Will add to the library as soon as possible.
User avatar
AlphaBravo
Posts: 586
Joined: 29 Sep 2013, 22:59

Re: BARCODER - Create 1D and 2D Barcodes (QRCode , C39,etc)

23 Jun 2016, 12:30

@Gio, cool, please replace any reference of 128B with simply 128
User avatar
Gio
Posts: 1247
Joined: 30 Sep 2013, 10:54
Location: Brazil

Re: BARCODER - Create 1D and 2D Barcodes (QRCode , C39,etc)

23 Jun 2016, 13:33

@AlphaBravo: Ok, will do it as soon as i can.
newbieforever
Posts: 493
Joined: 24 Aug 2016, 03:34

Re: BARCODER - Create 1D and 2D Barcodes (QRCode , C39,etc)

23 Nov 2018, 06:45

QR code works perfectly, thank you very much for this cool tool!

A question: The datamatrix code is not supported?
User avatar
Gio
Posts: 1247
Joined: 30 Sep 2013, 10:54
Location: Brazil

Re: BARCODER - Create 1D and 2D Barcodes (QRCode , C39,etc)

23 Nov 2018, 11:29

newbieforever wrote:
23 Nov 2018, 06:45
QR code works perfectly, thank you very much for this cool tool!

A question: The datamatrix code is not supported?
Glad to hear you found it useful :thumbup:

Unfortunately adding DataMatrix support is not planned at the moment.

Just being curious: Is there a specific reason for chosing DataMatrix codes over QR Codes in your mind?
newbieforever
Posts: 493
Joined: 24 Aug 2016, 03:34

Re: BARCODER - Create 1D and 2D Barcodes (QRCode , C39,etc)

23 Nov 2018, 15:53

Gio wrote:
23 Nov 2018, 11:29
Just being curious: Is there a specific reason for chosing DataMatrix codes over QR Codes in your mind?
Not in my mind, but I have to generate datamatrix codes for a receiver (authority) which doesn't accept QR code... Do you know a free tool supporting CL usage?
User avatar
AlphaBravo
Posts: 586
Joined: 29 Sep 2013, 22:59

Re: BARCODER - Create 1D and 2D Barcodes (QRCode , C39,etc)

24 Nov 2018, 16:45

Found a datamatrix code generator using an Excel VBA Macro here
It might not be very practical if you're going to use it a lot as it is slow, but it does work.
Hit Alt+F11 at Excel to view code, it is a bit complicated to follow and understand.
newbieforever
Posts: 493
Joined: 24 Aug 2016, 03:34

Re: BARCODER - Create 1D and 2D Barcodes (QRCode , C39,etc)

24 Nov 2018, 18:35

Thank you, AlphaBravo. Unfortunately I would need a standalone solution. But there seems to be no standalone & free & portable datamatrix code generator (supporting CL usage...to complete my requirements :facepalm: ) available. :headwall:
newbieforever
Posts: 493
Joined: 24 Aug 2016, 03:34

Re: BARCODER - Create 1D and 2D Barcodes (QRCode , C39,etc)

24 Nov 2018, 19:39

newbieforever wrote:
24 Nov 2018, 18:35
But there seems to be no standalone & free & portable datamatrix code generator (supporting CL usage...to complete my requirements :facepalm: ) available. :headwall:
Now I found this very impressive tool Zint Barcode Studio in the portable version:
https://portableapps.com/apps/utilities ... o_portable

It is said that Zint supports command-line usage:
zint.exe -o datamatrix.png -b 71 -d "Data to encode"

However, at the moment I am unable to reproduce this with Zint Portable:
ZintPortable.exe -o datamatrix.png -b 71 -d "Data to encode"

Does anybody here know if CL usage is not supported in the portable version?
Ahk_fan
Posts: 237
Joined: 31 Aug 2018, 14:34
Contact:

Re: BARCODER - Create 1D and 2D Barcodes (QRCode , C39,etc)

25 Nov 2018, 04:25

Hello newbiforever,

In directory App is a File zint.exe. You should take this file top start commandline. Zintportable.exe is only a startfile for Portable- Version
regards,
AHK_fan :)
https://hr-anwendungen.de
newbieforever
Posts: 493
Joined: 24 Aug 2016, 03:34

Re: BARCODER - Create 1D and 2D Barcodes (QRCode , C39,etc)

25 Nov 2018, 09:19

@Ahk_fan: Thank you very much, you are right, this works perfectly. :bravo:

Return to “Scripts and Functions (v1)”

Who is online

Users browsing this forum: No registered users and 129 guests