This project has moved. For the latest updates, please go here.

PDF 417 Encoding error on Universal App

Nov 28, 2015 at 12:56 PM

I'm receiving the exception The type initializer for 'ZXing.PDF417.Internal.PDF417HighLevelEncoder' threw an exception. related to a CP437 encoding when I try to encode a PDF417 barcode on a universal app for windows 10.

I saw a solution you gave in this URL But when I try to change the encoding to UTF-8, I receive the same exception.

I'm doing this way:
BarcodeWriter writer = new BarcodeWriter();

writer.Format = BarcodeFormat.PDF_417;
writer.Options.Width = 1280;
writer.Options.Height = 350;
writer.Options.Hints.Add(EncodeHintType.DISABLE_ECI, true);
writer.Options.Hints.Add(EncodeHintType.CHARACTER_SET, "UTF-8");

var barcodeImage = writer.Write(code);
What am I doing wrong?

Thank you