Can I open a *.pdf file with the BarCodeReader? I’m currently trying to run this bit of code and getting an exception “Parameter is not valid.” When I look at the exception detail I see that the error is coming from System.Drawing.SafeNativeMethods.Gdip.CheckStatus, at System.Drawing.Bitmap.ctor.
using (BarCodeReader barCodeReader = new BarCodeReader(fileName, DecodeType.AllSupportedTypes)) { foreach (BarCodeResult result in barCodeReader.ReadBarCodes()) { Console.WriteLine($"{result.CodeType}|{result.CodeTypeName}|{result.CodeText}"); }
}