This project has moved and is read-only. For the latest updates, please go here.

PDF 417 Encoding error on Universal App

Nov 28, 2015 at 1:56 PM
Hello,

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 https://github.com/Redth/ZXing.Net.Mobile/issues/109. 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