Softek Barcode Reader Toolkit with Docker and .Net
The Softek Barcode Reader Toolkit can now be used with Docker and .Net with multi-platform support in a single NuGet package.
Key facts:
- .Net Standard 2.0
- Includes native DLL files for OSX, Windows (x86 & x64) and Linux (x86 & x64).
- Automatically selects correct native DLL at run-time (see below).
- Reads barcodes from TIF or JPEG files/byte arrays or streams.
To use the package:
- In Visual Studio right click on the project and select “Manage NuGet Packages”
- Search for “softekbarcodenetstandard”
- Click on the package and then Install
After installation you should be able to add code similar to the following…
Example code:
Read from a file:
SoftekBarcodeNetStandard.BarcodeReader barcode = new SoftekBarcodeNetStandard.BarcodeReader();
int n = barcode.ScanBarCode(“somefile.tif”);
Read from a stream…
Stream s = Upload.OpenReadStream();
SoftekBarcodeNetStandard.BarcodeReader barcode = new SoftekBarcodeNetStandard.BarcodeReader();
int n = barcode.ScanBarCodeFromStream(s);
Read from a byte array:
SoftekBarcodeNetStandard.BarcodeReader barcode = new SoftekBarcodeNetStandard.BarcodeReader();
int n = barcode.ScanBarCodeFromByteArray(data);
Use of Native DLL Files
Note that the NuGet package includes the following native DLL/shared object files:
- SoftekBarcodeDLL.dll (Windows x86)
- SoftekBarcode64DLL.dll (Windows x64)
- libbardecode_linux.so (Linux x86)
- libbardecode_64linux.so (Linux x64)
- libbardecode_osx.dylib (Mac OSX)
These files are automatically copied to the output folder when the project is built. At run-time the SoftekBarcodeNetStandard DLL seamlessly loads functions from the appropriate native DLL/shared object file.
If you have any questions or need further information please contact nuget@bardecode.com