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
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
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?
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
Awesome, thanks for sharing it Alpha Bravo, this will certainly help many people
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?
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?
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.
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 ) available.