Handle import of documents containing Simple fonts with names of entries in the Encoding`s Differences that are not part of the Adobe Glyph List.
According to the PDF Specification (9.10.2 Mapping Character Codes to Unicode Values) if the name is not part of the list: If these methods fail to produce a Unicode value, there is no way to determine what the character code represents.
It is actually checked and only the appearance is wrong. When the file is saved the checkboxes states are as expected.
This behavior is observed with PdfImportSettings.ReadOnDemand setting only.
When making changes to Form fields then flattening them and invoking the viewer`s Save method an exception is thrown: System.Collections.Generic.KeyNotFoundException: 'The given key was not present in the dictionary.'
Code to reproduce the issue:
this.pdfViewer.Document.AcroForm.FlattenFormFields();
using (Stream output = File.OpenWrite("Exported.pdf"))
{
this.pdfViewer.Save(output);
}
this.pdfViewer.Document.AcroForm.FlattenFormFields();
using (Stream output = File.OpenWrite("Exported.pdf"))
{
PdfFormatProvider provider = new PdfFormatProvider();
provider.Export(this.pdfViewer.Document, output);
}