Spire.Barcode is a professional barcode library specially designed for .NET developers (C#, VB.NET, ASP.NET, .NET Core) and Java developers (J2SE and J2EE) to generate, read and scan 1D & 2D barcodes.

Sat Jan 13, 2024 1:13 pm

when im try scan one image, the component send me the message :

"System.FormatException: 'The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters."

the code is:

string _Path = "C:\\imageScan.jpeg";
Spire.Barcode.License.LicenseProvider.SetLicenseKey(Resources.license_elic);
string[]? _Result = BarcodeScanner.Scan(_Path, BarCodeType.Pdf417);

dark_scamp
 
Posts: 1
Joined: Mon Jun 01, 2020 9:54 pm

Mon Jan 15, 2024 2:36 am

Hello,

Thank you for your inquiry.
Based on the error message you provided, it seems that there might be an issue with the way you are using the license. The KEY value you have entered in "SetLicenseKey(Resources.license_elic)" appears to be incorrect.
Here is the correct way to use the license. Please refer to the following example:
Code: Select all
Spire.Barcode.License.LicenseProvider.SetLicenseKey("your licenseKey");
or
Spire.Barcode.License.LicenseProvider.SetLicenseFileName("license.elic.xml");
Spire.Barcode.License.LicenseProvider.LoadLicense();

Please ensure that you are providing the correct license key in the above code snippet. If you have made the necessary changes and the issue still persists, kindly provide us with the following information for further investigation.You could attach them here or send them to us via email (support@e-iceblue.com). Thanks in advance.
1) Your input image file.
2) Your test environment, such as OS info (E.g. Windows 7, 64-bit) and region setting (E.g. China, Chinese).
3) Your application type, such as Console app (. Net 6.0).

Sincerely,
Annika
E-iceblue support team
User avatar

Annika.Zhou
 
Posts: 1657
Joined: Wed Apr 07, 2021 2:50 am

Return to Spire.BarCode

cron