port integration for pdf 417 1-3

This commit is contained in:
Henry Schimke
2022-12-26 14:22:37 -06:00
parent 3021c163d4
commit cba6a10c4b
7 changed files with 69 additions and 121 deletions

View File

@@ -18,8 +18,9 @@ use std::collections::HashMap;
use crate::{
aztec::AztecReader, datamatrix::DataMatrixReader, maxicode::MaxiCodeReader,
oned::MultiFormatOneDReader, qrcode::QRCodeReader, BarcodeFormat, BinaryBitmap, DecodeHintType,
DecodeHintValue, DecodingHintDictionary, Exceptions, RXingResult, Reader,
oned::MultiFormatOneDReader, pdf417::PDF417Reader, qrcode::QRCodeReader, BarcodeFormat,
BinaryBitmap, DecodeHintType, DecodeHintValue, DecodingHintDictionary, Exceptions, RXingResult,
Reader,
};
/**
@@ -136,8 +137,7 @@ impl MultiFormatReader {
readers.push(Box::new(AztecReader {}));
}
if formats.contains(&BarcodeFormat::PDF_417) {
unimplemented!("");
// readers.push(new PDF417Reader());
readers.push(Box::new(PDF417Reader {}));
}
if formats.contains(&BarcodeFormat::MAXICODE) {
readers.push(Box::new(MaxiCodeReader {}));
@@ -150,19 +150,17 @@ impl MultiFormatReader {
if readers.is_empty() {
if !tryHarder {
readers.push(Box::new(MultiFormatOneDReader::new(hints)));
//TODO: ADD MultiformatOneDReader here
}
readers.push(Box::new(QRCodeReader {}));
readers.push(Box::new(DataMatrixReader {}));
readers.push(Box::new(AztecReader {}));
// readers.push( PDF417Reader());
readers.push(Box::new(PDF417Reader {}));
readers.push(Box::new(MaxiCodeReader {}));
// unimplemented!("");
if tryHarder {
readers.push(Box::new(MultiFormatOneDReader::new(hints)));
//TODO: ADD MultiformatOneDReader here
}
}
self.readers = readers; //Vec::new(); //readers.toArray(EMPTY_READER_ARRAY);