var pageMarginsPropInfo = typeof(PagesLayoutManagerBase).GetField("pageMargins", System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.NonPublic);
pageMarginsPropInfo.SetValue(null, new Size(0, 0));
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);
}
GoToPage() method is not working correctly in some cases when called in DocumentChanged event handler. The known cases are described below: 1. When RadPdfViewer and the document are loaded initially and document is set through the RadPdfViewer.Document property. Workaround: DocumentSource property could be set (in XAML or in code-behind) instead of the Document property. If the Document property is used, this should be done after RadPdfViewer is loaded. 2. When the ScaleMode is changed in DocumentChanged event handler and then GoToPage() method is called in the same event handler.
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.
The ActionsManager.ExecuteUri method throws exception when tries to open relative Uri. As the exception is caught, with the current state no action is observed when interacting with such link in RadPdfViewer.