How to disable reverse image scan in zxing android app? Is it possible to do with app settings or modifying sources? I just want to scan code from left to the right direction (green line). And not to scan code from right to left direction (red line). There are some pseudo barcodes without error control (en.wikipedia.org/wiki/Pharmacode for example) which have different codes in two directions. Thanks for any help!
Asked
Active
Viewed 338 times
1
-
1Given that barcodes are designed to be read in either direction (to avoid having the user flip the device/physical print) to get the same encoded number, the question doesn't make sense. What/why do you need this feature? – Morrison Chang Apr 25 '18 at 21:44
-
1i'm totally agree with you. But there are some pseudo barcodes without error control (https://en.wikipedia.org/wiki/Pharmacode for example) which have different codes in two directions. I've implemented pharmacode format, but I want to force app to give only one direction for zxing library. – user79382 Apr 26 '18 at 06:02
-
@user79382 Could you share your pharmacode implementation? It would be really great :) – suomi35 Jan 14 '19 at 22:31
-
@suomi35 Yes I will, of course! Give me some time. – user79382 Jan 16 '19 at 07:55
-
1@suomi32 Use this manual for download or build barcode scanner with pharmacode support https://github.com/ruslan2k/zxing/blob/master/README-PHARMACODE.md – user79382 Jan 30 '19 at 14:59
1 Answers
0
If the format isn't supported (and Pharmacode isn't on the list of ZXing barcodes: https://github.com/zxing/zxing/blob/master/README.md) you'll have to modify the ZXing code to support your specific format or find/buy/license a library that does. The fact that I can flip a UPC or Code128 barcode is embedded in the decode logic for that code type.
Honestly I believe it will take some effort to modify ZXing as you will need to modify a 1-D decoder to take in a orientation value or modify the decoding output to handle both orientation cases and separately parse out the correct orientation results.

Morrison Chang
- 11,691
- 3
- 41
- 77