0

I'm using Laravel and https://github.com/milon/barcode to generate barcodes. From an API I got string but not the format.

How to recognize which format is because if I put the wrong format, my function which generates PDF fail. Is there any PHP to recognize barcode format based on a string?

Aleks Per
  • 1,549
  • 7
  • 33
  • 68
  • How your string look like? – STA Mar 06 '21 at 12:51
  • If only common characters are specified/notified for multiple barcode types, there is no way to distinguish the barcode types. You can tell if a character or data sequence that is only available for some barcode type is used, but the probability is low. As a countermeasure, specify the barcode type from the outside by user instruction etc., or limit the barcode type that can be used. – kunif Mar 06 '21 at 14:54
  • ok, just how barcode scanners works... they recognize barcode format – Aleks Per Mar 06 '21 at 17:01

0 Answers0