Post without Account — your post will be reviewed, and if appropriate, posted under Anonymous. You can also use this link to report any problems registering.

CTS 1 - Expanded Bar Code capabilities

  • 5 Replies
  • 1404 Views
*

Offline Phil

  • Global Moderator
  • Sr. Member
  • *****
  • 359
    • View Profile
CTS 1 - Expanded Bar Code capabilities
« January 31, 2017, 02:12:57 PM »
The BarCode area of PDF::API2 already creates a number of bar codes. I need to print out examples of each, to tell for sure, but I think they are all (or mostly) "one dimensional" bar codes. PDF::API2 needs some "2D" barcodes (look like badly pixelated images) and QR codes (those funky square things you scan with a smartphone). Preference would be given to standalone libraries (not requiring a dependency on other libraries), but where that would involve a ridiculous amount of code to be added to PDF::API2, a glue interface to another (existing and currently supported) CPAN module would be acceptable. 

Depending on how many flavors of 2D and QR codes we might end up supporting, we should think about the organization up font. If there are enough, there could be BarCode2D/ and QRCode/ directories as siblings of Resource/XObject/Form/BarCode/.

And of course, additional "1D" barcodes are always welcome, so long as they are in reasonably wide use. No "company-proprietary" or experimental/one-off codes, please.
« Last Edit: February 26, 2017, 10:53:02 PM by Phil »

*

Offline Phil

  • Global Moderator
  • Sr. Member
  • *****
  • 359
    • View Profile
Re: CTS 1 - Expanded Bar Code capabilities
« Reply #1: February 09, 2017, 09:37:54 AM »
In RT 119962, there was a comment that the API3 version of one of the barcodes (2of5int) "seems to work better". It might be worth looking at the PDF::API3 package and seeing if indeed, anything works better, and if so, was it because something was rewritten before the project was abandoned? It might be something very general in the support, or the barcode module itself was redone. Of course, the first thing to know is what is "better" -- is there a bug in the PDF::API2 implementation, or is it performance?
« Last Edit: February 26, 2017, 10:53:49 PM by Phil »

*

Offline Phil

  • Global Moderator
  • Sr. Member
  • *****
  • 359
    • View Profile
Re: CTS 1 - Expanded Bar Code capabilities
« Reply #2: April 01, 2017, 12:26:38 PM »
I have added a demo file examples/BarCode.pl for release 3.003 to generate all 11 barcode variations currently supported. I have no way of telling whether the bar codes are in fact correct. it would probably take someone with various scanners to determine whether they are correct, and do more testing within each type (valid characters, etc.). They look nice, though.

It would be nice to add at least the various forms of UPC bar codes — anyone up for a project? Then come 2D and QR codes.

*

Offline Phil

  • Global Moderator
  • Sr. Member
  • *****
  • 359
    • View Profile
Re: CTS 1 - Expanded Bar Code capabilities
« Reply #3: December 29, 2017, 02:08:34 PM »
 PhilterPaper commented Dec 29

Vector-QRCode-IntoPDF might be a good starting point for QRCode support. I haven't looked at it in detail yet, but it uses PDF::API2 so it should translate easily.

Also look at PDF-Report "barcode.pl" for an example of using PDF::API2 barcodes -- this might improve the examples.

*

Offline Phil

  • Global Moderator
  • Sr. Member
  • *****
  • 359
    • View Profile
Re: CTS 1 - Expanded Bar Code capabilities
« Reply #4: December 31, 2017, 02:06:32 PM »
PhilterPaper commented Dec 31

See #46 [RT 119962 Found a bug when creating a new XObject Form] for a suggestion that possibly there is a bug in the barcode code that produces bad XObject Form entries.

*

Offline Phil

  • Global Moderator
  • Sr. Member
  • *****
  • 359
    • View Profile
Re: CTS 1 - Expanded Bar Code capabilities
« Reply #5: March 05, 2018, 09:29:43 AM »
The site freebarcodefonts.dobsonsw.com has several "free" barcode fonts, including Code 128, Interleaved 2 of 5, Codabar, USPS Postnet, Code 93, and Code 39. There are lots of tools for sale, and I have not yet checked the font licensing in detail (whether it's truly free) or whether it's even in a standard format that PDF::Builder could make use of. Anyway, it's an interesting alternative to drawing the codes line by line.