bwipp / postscriptbarcode

Barcode Writer in Pure PostScript
https://bwipp.terryburton.co.uk
MIT License
462 stars 64 forks source link

Add input validation to each symbology #17

Closed terryburton closed 1 year ago

terryburton commented 10 years ago

Add proper input validation with detailed error messages to all symbologies:

terryburton commented 1 year ago

@gitlost Hi. From now on, anything that causes the PS interpreter to fail without calling the BWIPP raiseerror routine should be considered to be a bug.

gitlost commented 1 year ago

Hi, thanks, just a few things I noticed on running the Zint tests with BWIPP enabled:

If you like, I can do PRs for these....

terryburton commented 1 year ago
  • in msi, the check when badmod11 is set should allow any checktype that contains a mod11 I think, i.e. mod11 or ncrmod11 or mod1110 or ncrmod1110

I think you're right.

  • in code49, the option concat clashes with the built-in concat operator - maybe rename to append?

Agreed. Note the workaround I put in BWIPP for this, but I agree we should rename it to append if it causes trouble downstream.

  • in pdf417, the check of eclevel should be from 0 to 8, not 1 to 5

Doh.

  • in datamatrix, the doly/dmre logic needs to be done in the second metrics loop also

If you like, I can do PRs for these....

That would be excellent, thank you.

gitlost commented 1 year ago

Cool, will do.