Hey guys,
Doing some testing here on Aspose.Barcode and trying to read from a stream which originates in an Amazon S3 bucket. If I use a local filename, it works fine. If I try and pass barCodeReader a stream, I get the following Barcodereader.JPG (76.1 KB)
Code is pretty simple and here for convenience as well as in the screenshot
AmazonS3Client client = new AmazonS3Client();
GetObjectRequest request = new GetObjectRequest();
request.BucketName = newdoc.BucketName;
request.Key = newdoc.ObjectKey;
GetObjectResponse response = client.GetObject(request);
Stream docStream = new MemoryStream();
response.ResponseStream.CopyTo(docStream);
BarCodeReader barCodeReader = new BarCodeReader(docStream, DecodeType.Code39Extended);
barCodeReader.RecognitionMode = RecognitionMode.MaxBarCodes;
while (barCodeReader.Read())
{
Console.WriteLine(barCodeReader.GetCodeText());
}
Any ideas ? I’m using v 17.6.0 installed via NuGet and a temporary license file.
Thanks
Carl