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.

Fri Aug 04, 2023 12:35 pm

Hello new to this lib and barcodes and I'm trying to read a bitmap barcode,

and I keep getting this error:
{"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. "}

now I tried to add the barcode type etc. but keep getting the same error.
below are some of the code I tried and not limited too :D

I must be doing something wrong.


code:

Code: Select all
 Spire.License.LicenseProvider.SetLicenseKey("Mylic.xml");
  Bitmap bitmap = (Bitmap)Image.FromFile(@"C:\tmp\ExtractPage3.tif");
  string[] data = Spire.Barcode.BarcodeScanner.Scan(bitmap);


I also tried :

Code: Select all
 Spire.License.LicenseProvider.SetLicenseKey("Mylic.xml");
  string[] data = Spire.Barcode.BarcodeScanner.Scan(@"C:\tmp\ExtractPage3.tif");


and
Code: Select all
  Spire.License.LicenseProvider.SetLicenseKey("Mylic.xml");
  string[] data = Spire.Barcode.BarcodeScanner.Scan(@"C:\tmp\ExtractPage3.tif",BarCodeType.Code39);


Thank you

mike.colonna
 
Posts: 1
Joined: Fri Aug 04, 2023 11:49 am

Mon Aug 07, 2023 3:37 am

Hello,

Thank you for your inquiry.
The reason why you reported the error 'Base-64 String' is because your license application method is incorrect, you can apply the license using the following method:
Code: Select all
Spire.License.LicenseProvider.SetLicenseKey("your licenseKey");
//or
Spire.License.LicenseProvider.SetLicenseFileName("license.elic.xml");
Spire.License.LicenseProvider.LoadLicense();

If you have any other questions or concerns, please feel free to contact us anytime.

Sincerely,
Wenly
E-iceblue support team
User avatar

Wenly.Zhang
 
Posts: 149
Joined: Tue May 16, 2023 2:19 am

Return to Spire.BarCode

cron